Convert all class usage to relative names

Change-Id: Ic7b8f4e584e3f1ed1d5c6c568cc6caf67493cdda
This commit is contained in:
Tobias Urdin 2019-12-08 23:24:12 +01:00
parent 298ab33801
commit a053d4e86e
23 changed files with 56 additions and 56 deletions

View File

@ -1,8 +1,8 @@
# This is an example of site.pp to deploy Trove # This is an example of site.pp to deploy Trove
class { '::trove::client': } class { 'trove::client': }
class { '::trove::keystone::auth': class { 'trove::keystone::auth':
admin_address => '10.0.0.1', admin_address => '10.0.0.1',
internal_address => '10.0.0.1', internal_address => '10.0.0.1',
public_address => '10.0.0.1', public_address => '10.0.0.1',
@ -10,28 +10,28 @@ class { '::trove::keystone::auth':
region => 'OpenStack' region => 'OpenStack'
} }
class { '::trove::db::mysql': class { 'trove::db::mysql':
password => 'dbpass', password => 'dbpass',
host => '10.0.0.1', host => '10.0.0.1',
allowed_hosts => ['10.0.0.1'] allowed_hosts => ['10.0.0.1']
} }
class { '::trove': class { 'trove':
database_connection => 'mysql://trove:secrete@10.0.0.1/trove?charset=utf8', database_connection => 'mysql://trove:secrete@10.0.0.1/trove?charset=utf8',
default_transport_url => 'rabbit://trove:an_even_bigger_secret@10.0.0.1:5672/trove', default_transport_url => 'rabbit://trove:an_even_bigger_secret@10.0.0.1:5672/trove',
nova_proxy_admin_pass => 'novapass', nova_proxy_admin_pass => 'novapass',
} }
class { '::trove::api': class { 'trove::api':
bind_host => '10.0.0.1', bind_host => '10.0.0.1',
auth_url => 'https://identity.openstack.org:5000/v3', auth_url => 'https://identity.openstack.org:5000/v3',
keystone_password => 'verysecrete' keystone_password => 'verysecrete'
} }
class { '::trove::conductor': class { 'trove::conductor':
auth_url => 'https://identity.openstack.org:5000/v3' auth_url => 'https://identity.openstack.org:5000/v3'
} }
class { '::trove::taskmanager': class { 'trove::taskmanager':
auth_url => 'https://identity.openstack.org:5000/v3' auth_url => 'https://identity.openstack.org:5000/v3'
} }

View File

@ -115,10 +115,10 @@ class trove::api(
$taskmanager_queue = 'taskmanager', $taskmanager_queue = 'taskmanager',
) inherits trove { ) inherits trove {
include ::trove::deps include trove::deps
include ::trove::db include trove::db
include ::trove::db::sync include trove::db::sync
include ::trove::params include trove::params
# basic service config # basic service config
trove_config { trove_config {
@ -153,7 +153,7 @@ class trove::api(
} }
if $auth_strategy == 'keystone' { if $auth_strategy == 'keystone' {
include ::trove::keystone::authtoken include trove::keystone::authtoken
$trove_auth_url = "${regsubst($::trove::keystone::authtoken::www_authenticate_uri, '(\/v3$|\/v2.0$|\/$)', '')}/v3" $trove_auth_url = "${regsubst($::trove::keystone::authtoken::www_authenticate_uri, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
trove_config { trove_config {

View File

@ -35,7 +35,7 @@ class trove::client (
$package_ensure = present, $package_ensure = present,
) inherits trove::params { ) inherits trove::params {
include ::trove::deps include trove::deps
package { 'python-troveclient': package { 'python-troveclient':
ensure => $package_ensure, ensure => $package_ensure,

View File

@ -74,8 +74,8 @@ class trove::conductor(
$trace_sqlalchemy = $::os_service_default, $trace_sqlalchemy = $::os_service_default,
) inherits trove { ) inherits trove {
include ::trove::deps include trove::deps
include ::trove::params include trove::params
if $::trove::database_connection { if $::trove::database_connection {
if($::trove::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) { if($::trove::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {

View File

@ -69,7 +69,7 @@ class trove::config (
$trove_api_paste_ini = {}, $trove_api_paste_ini = {},
) { ) {
include ::trove::deps include trove::deps
validate_legacy(Hash, 'validate_hash', $trove_config) validate_legacy(Hash, 'validate_hash', $trove_config)
validate_legacy(Hash, 'validate_hash', $trove_taskmanager_config) validate_legacy(Hash, 'validate_hash', $trove_taskmanager_config)

View File

@ -56,7 +56,7 @@ class trove::db (
$database_idle_timeout = undef, $database_idle_timeout = undef,
) { ) {
include ::trove::deps include trove::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 \

View File

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

View File

@ -32,7 +32,7 @@ class trove::db::postgresql(
$privileges = 'ALL', $privileges = 'ALL',
) { ) {
include ::trove::deps include trove::deps
validate_legacy(String, 'validate_string', $password) validate_legacy(String, 'validate_string', $password)

View File

@ -19,7 +19,7 @@
# #
class trove::db::sync { class trove::db::sync {
include ::trove::deps include trove::deps
exec { 'trove-manage db_sync': exec { 'trove-manage db_sync':
path => '/usr/bin', path => '/usr/bin',

View File

@ -55,8 +55,8 @@ define trove::generic_service(
$package_ensure = 'present', $package_ensure = 'present',
) { ) {
include ::trove::deps include trove::deps
include ::trove::params include trove::params
$trove_title = "trove-${name}" $trove_title = "trove-${name}"

View File

@ -108,8 +108,8 @@ class trove::guestagent(
$control_exchange = undef, $control_exchange = undef,
) inherits trove { ) inherits trove {
include ::trove::deps include trove::deps
include ::trove::params include trove::params
if $control_exchange { if $control_exchange {
warning("control_exchange parameter is deprecated. Please use \ warning("control_exchange parameter is deprecated. Please use \

View File

@ -360,9 +360,9 @@ class trove(
$package_ensure = 'present', $package_ensure = 'present',
) { ) {
include ::trove::deps include trove::deps
include ::trove::policy include trove::policy
include ::trove::params include trove::params
if $nova_compute_url { if $nova_compute_url {
trove_config { 'DEFAULT/nova_compute_url': value => $nova_compute_url } trove_config { 'DEFAULT/nova_compute_url': value => $nova_compute_url }

View File

@ -104,7 +104,7 @@ class trove::keystone::auth (
$internal_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', $internal_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s',
) { ) {
include ::trove::deps include trove::deps
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| tag == 'trove-service' |> Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| tag == 'trove-service' |>

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# Parameters for puppet-trove # Parameters for puppet-trove
# #
class trove::params { class trove::params {
include ::openstacklib::defaults include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers $pyvers = $::openstacklib::defaults::pyvers
$client_package_name = "python${pyvers}-troveclient" $client_package_name = "python${pyvers}-troveclient"

View File

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

View File

@ -52,7 +52,7 @@ class trove::quota (
$max_backups_per_user = undef, $max_backups_per_user = undef,
) { ) {
include ::trove::deps include trove::deps
if $max_instances_per_user { if $max_instances_per_user {
warning("max_instances_per_user deprecated, has no effect and will be removed after Newton cycle. \ warning("max_instances_per_user deprecated, has no effect and will be removed after Newton cycle. \

View File

@ -105,8 +105,8 @@ class trove::taskmanager(
$use_guestagent_template = true, $use_guestagent_template = true,
) inherits trove { ) inherits trove {
include ::trove::deps include trove::deps
include ::trove::params include trove::params
if $default_neutron_networks { if $default_neutron_networks {
warning("trove::taskmanager::default_neutron_networks is deprecated and will be removed in \ warning("trove::taskmanager::default_neutron_networks is deprecated and will be removed in \

View File

@ -6,12 +6,12 @@ describe 'basic trove' 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
include ::openstack_integration::trove include openstack_integration::trove
EOS EOS

View File

@ -45,7 +45,7 @@ describe 'trove::api' do
glance_endpoint_type => '<SERVICE DEFAULT>', glance_endpoint_type => '<SERVICE DEFAULT>',
neutron_endpoint_type => '<SERVICE DEFAULT>', neutron_endpoint_type => '<SERVICE DEFAULT>',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -154,7 +154,7 @@ describe 'trove::api' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
single_tenant_mode => 'true'} single_tenant_mode => 'true'}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -170,7 +170,7 @@ describe 'trove::api' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -187,7 +187,7 @@ describe 'trove::api' do
rabbit_ha_queues => 'true', rabbit_ha_queues => 'true',
amqp_durable_queues => 'true', amqp_durable_queues => 'true',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -203,7 +203,7 @@ describe 'trove::api' do
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
rabbit_ha_queues => 'true', rabbit_ha_queues => 'true',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -219,7 +219,7 @@ describe 'trove::api' do
use_neutron => true, use_neutron => true,
default_neutron_networks => 'trove_service', default_neutron_networks => 'trove_service',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -240,7 +240,7 @@ describe 'trove::api' do
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
use_neutron => false use_neutron => false
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -266,7 +266,7 @@ describe 'trove::api' do
kombu_ssl_certfile => '/path/to/ssl/cert/file', kombu_ssl_certfile => '/path/to/ssl/cert/file',
kombu_ssl_keyfile => '/path/to/ssl/keyfile', kombu_ssl_keyfile => '/path/to/ssl/keyfile',
kombu_ssl_version => 'TLSv1'} kombu_ssl_version => 'TLSv1'}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -287,7 +287,7 @@ describe 'trove::api' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
rabbit_use_ssl => true} rabbit_use_ssl => true}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -308,7 +308,7 @@ describe 'trove::api' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
rabbit_use_ssl => false} rabbit_use_ssl => false}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -332,7 +332,7 @@ describe 'trove::api' do
rpc_response_timeout => '120', rpc_response_timeout => '120',
control_exchange => 'openstack', control_exchange => 'openstack',
notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673' } notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673' }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end
@ -350,7 +350,7 @@ describe 'trove::api' do
"class { 'trove' : "class { 'trove' :
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
} }
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end

View File

@ -62,7 +62,7 @@ describe 'trove::conductor' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
single_tenant_mode => 'true'} single_tenant_mode => 'true'}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end

View File

@ -123,7 +123,7 @@ describe 'trove::taskmanager' do
"class { 'trove': "class { 'trove':
nova_proxy_admin_pass => 'verysecrete', nova_proxy_admin_pass => 'verysecrete',
single_tenant_mode => 'true'} single_tenant_mode => 'true'}
class { '::trove::keystone::authtoken': class { 'trove::keystone::authtoken':
password => 'a_big_secret', password => 'a_big_secret',
}" }"
end end