Convert all class usage to relative names
Change-Id: Ifd3d732aeb86e1c046f0164b5a008fd37356d34e
This commit is contained in:
parent
9b0f7ac93a
commit
1e5aac99cd
|
@ -9,4 +9,4 @@
|
|||
# Learn more about module testing here:
|
||||
# https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module
|
||||
#
|
||||
include ::cloudkitty
|
||||
include cloudkitty
|
||||
|
|
|
@ -51,10 +51,10 @@ class cloudkitty::api (
|
|||
$service_name = 'httpd',
|
||||
) {
|
||||
|
||||
include ::cloudkitty
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include ::cloudkitty::policy
|
||||
include cloudkitty
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
include cloudkitty::policy
|
||||
|
||||
package { 'cloudkitty-api':
|
||||
ensure => $package_ensure,
|
||||
|
@ -71,11 +71,11 @@ class cloudkitty::api (
|
|||
}
|
||||
|
||||
if $sync_db {
|
||||
include ::cloudkitty::db::sync
|
||||
include cloudkitty::db::sync
|
||||
}
|
||||
|
||||
if $service_name == 'httpd' {
|
||||
include ::apache::params
|
||||
include apache::params
|
||||
service { 'cloudkitty-api':
|
||||
ensure => 'stopped',
|
||||
name => $::cloudkitty::params::api_service_name,
|
||||
|
|
|
@ -12,8 +12,8 @@ class cloudkitty::client (
|
|||
$ensure = 'present'
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
|
||||
package { 'python-cloudkittyclient':
|
||||
ensure => $ensure,
|
||||
|
|
|
@ -28,7 +28,7 @@ class cloudkitty::config (
|
|||
$cloudkitty_api_paste_ini = {},
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $cloudkitty_config)
|
||||
validate_legacy(Hash, 'validate_hash', $cloudkitty_api_paste_ini)
|
||||
|
|
|
@ -62,7 +62,7 @@ class cloudkitty::db (
|
|||
$database_idle_timeout = undef,
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
|
|
@ -43,7 +43,7 @@ class cloudkitty::db::mysql(
|
|||
$allowed_hosts = undef
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class cloudkitty::db::postgresql(
|
|||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'cloudkitty':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
|
|
|
@ -12,7 +12,7 @@ class cloudkitty::db::sync(
|
|||
$extra_params = undef,
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
exec { 'cloudkitty-db-sync':
|
||||
command => "cloudkitty-dbsync upgrade ${extra_params}",
|
||||
|
|
|
@ -305,10 +305,10 @@ class cloudkitty(
|
|||
$keystone_version = '3',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::params
|
||||
include ::cloudkitty::db
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::storage
|
||||
include cloudkitty::params
|
||||
include cloudkitty::db
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::storage
|
||||
|
||||
package { 'cloudkitty-common':
|
||||
ensure => $package_ensure,
|
||||
|
|
|
@ -88,7 +88,7 @@ class cloudkitty::keystone::auth (
|
|||
$rating_role = 'rating',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
if $configure_user_role {
|
||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Anchor['cloudkitty::config::end']
|
||||
|
|
|
@ -202,7 +202,7 @@ class cloudkitty::keystone::authtoken(
|
|||
$service_token_roles_required = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
keystone::resource::authtoken { 'cloudkitty_config':
|
||||
username => $username,
|
||||
|
|
|
@ -123,7 +123,7 @@ class cloudkitty::logging(
|
|||
$log_date_format = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
oslo::log { 'cloudkitty_config':
|
||||
use_stderr => $use_stderr,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Parameters for puppet-cloudkitty
|
||||
#
|
||||
class cloudkitty::params {
|
||||
include ::openstacklib::defaults
|
||||
include openstacklib::defaults
|
||||
$pyvers = $::openstacklib::defaults::pyvers
|
||||
|
||||
$client_package_name = "python${pyvers}-cloudkittyclient"
|
||||
|
|
|
@ -28,8 +28,8 @@ class cloudkitty::policy (
|
|||
$policy_path = '/etc/cloudkitty/policy.json',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ class cloudkitty::processor (
|
|||
$auth_section = 'keystone_authtoken',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
|
||||
package { 'cloudkitty-processor':
|
||||
ensure => $package_ensure,
|
||||
|
|
|
@ -12,7 +12,7 @@ class cloudkitty::storage(
|
|||
$extra_params = '--config-file /etc/cloudkitty/cloudkitty.conf',
|
||||
){
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include cloudkitty::deps
|
||||
|
||||
exec { 'cloudkitty-storage-init':
|
||||
command => "cloudkitty-storage-init ${extra_params}",
|
||||
|
|
|
@ -12,8 +12,8 @@ class cloudkitty::ui (
|
|||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
|
||||
package { 'cloudkitty-ui':
|
||||
ensure => $package_ensure,
|
||||
|
|
|
@ -119,12 +119,12 @@ class cloudkitty::wsgi::apache (
|
|||
$custom_wsgi_process_options = {},
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
include ::apache
|
||||
include ::apache::mod::wsgi
|
||||
include cloudkitty::deps
|
||||
include cloudkitty::params
|
||||
include apache
|
||||
include apache::mod::wsgi
|
||||
if $ssl {
|
||||
include ::apache::mod::ssl
|
||||
include apache::mod::ssl
|
||||
}
|
||||
|
||||
::openstacklib::wsgi::apache { 'cloudkitty_wsgi':
|
||||
|
|
|
@ -6,11 +6,11 @@ describe 'basic cloudkitty' 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_user { 'cloudkitty':
|
||||
admin => true,
|
||||
|
@ -33,13 +33,13 @@ describe 'basic cloudkitty' do
|
|||
warning('Cloudkitty is not yet packaged on Debian systems.')
|
||||
}
|
||||
'RedHat': {
|
||||
class { '::cloudkitty::db':
|
||||
class { 'cloudkitty::db':
|
||||
database_connection => 'mysql+pymysql://cloudkitty:a_big_secret@127.0.0.1/cloudkitty?charset=utf8',
|
||||
}
|
||||
class { '::cloudkitty::logging':
|
||||
class { 'cloudkitty::logging':
|
||||
debug => true,
|
||||
}
|
||||
class { '::cloudkitty':
|
||||
class { 'cloudkitty':
|
||||
default_transport_url => 'rabbit://cloudkitty:an_even_bigger_secret@127.0.0.1:5672',
|
||||
# NOTE(tobias-urdin): Cloudkitty in Stein has moved to storage v2 by default and the
|
||||
# only driver available is InfluxDB which we do not deploy. This sets it back to the
|
||||
|
@ -47,24 +47,24 @@ describe 'basic cloudkitty' do
|
|||
storage_backend => 'sqlalchemy',
|
||||
storage_version => '1',
|
||||
}
|
||||
class { '::cloudkitty::keystone::auth':
|
||||
class { 'cloudkitty::keystone::auth':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::cloudkitty::keystone::authtoken':
|
||||
class { 'cloudkitty::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::cloudkitty::db::mysql':
|
||||
class { 'cloudkitty::db::mysql':
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { '::cloudkitty::api':
|
||||
class { 'cloudkitty::api':
|
||||
service_name => 'httpd',
|
||||
}
|
||||
include ::apache
|
||||
class { '::cloudkitty::wsgi::apache':
|
||||
include apache
|
||||
class { 'cloudkitty::wsgi::apache':
|
||||
ssl => false,
|
||||
}
|
||||
class { '::cloudkitty::processor': }
|
||||
class { '::cloudkitty::client': }
|
||||
class { 'cloudkitty::processor': }
|
||||
class { 'cloudkitty::client': }
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily (${::osfamily})")
|
||||
|
|
|
@ -44,10 +44,10 @@ describe 'cloudkitty::api' do
|
|||
end
|
||||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
include ::cloudkitty::db
|
||||
"include apache
|
||||
include cloudkitty::db
|
||||
class { 'cloudkitty': }
|
||||
class { '::cloudkitty::keystone::authtoken':
|
||||
class { 'cloudkitty::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}"
|
||||
end
|
||||
|
@ -68,10 +68,10 @@ describe 'cloudkitty::api' do
|
|||
end
|
||||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
include ::cloudkitty::db
|
||||
"include apache
|
||||
include cloudkitty::db
|
||||
class { 'cloudkitty': }
|
||||
class { '::cloudkitty::keystone::authtoken':
|
||||
class { 'cloudkitty::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}"
|
||||
end
|
||||
|
@ -86,7 +86,7 @@ describe 'cloudkitty::api' do
|
|||
})
|
||||
end
|
||||
let :pre_condition do
|
||||
"class { '::cloudkitty::keystone::authtoken':
|
||||
"class { 'cloudkitty::keystone::authtoken':
|
||||
password => 'a_big_secret',
|
||||
}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue