Convert all class usage to relative names
Change-Id: Ieb9a1d2c1dcef360ca7a323fe4f6cdbb61feecfe
This commit is contained in:
parent
a33b5782dd
commit
ce76a91f62
@ -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 ::zaqar
|
include zaqar
|
||||||
|
@ -12,8 +12,8 @@ class zaqar::client (
|
|||||||
$ensure = 'present'
|
$ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
include ::zaqar::params
|
include zaqar::params
|
||||||
|
|
||||||
package { 'python-zaqarclient':
|
package { 'python-zaqarclient':
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
|
@ -24,7 +24,7 @@ class zaqar::config (
|
|||||||
$zaqar_config = {},
|
$zaqar_config = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $zaqar_config)
|
validate_legacy(Hash, 'validate_hash', $zaqar_config)
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class zaqar::db::mysql(
|
|||||||
$allowed_hosts = undef
|
$allowed_hosts = undef
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class zaqar::db::postgresql(
|
|||||||
$privileges = 'ALL',
|
$privileges = 'ALL',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'zaqar':
|
::openstacklib::db::postgresql { 'zaqar':
|
||||||
password_hash => postgresql_password($user, $password),
|
password_hash => postgresql_password($user, $password),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
class zaqar::db::sync {
|
class zaqar::db::sync {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
exec { 'zaqar-db-sync':
|
exec { 'zaqar-db-sync':
|
||||||
command => 'zaqar-sql-db-manage upgrade head',
|
command => 'zaqar-sql-db-manage upgrade head',
|
||||||
|
@ -88,15 +88,15 @@ class zaqar(
|
|||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) inherits zaqar::params {
|
) inherits zaqar::params {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
resources { 'zaqar_config':
|
resources { 'zaqar_config':
|
||||||
purge => $purge_config,
|
purge => $purge_config,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::zaqar::keystone::authtoken
|
include zaqar::keystone::authtoken
|
||||||
include ::zaqar::keystone::trust
|
include zaqar::keystone::trust
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'zaqar-common':
|
package { 'zaqar-common':
|
||||||
|
@ -86,7 +86,7 @@ class zaqar::keystone::auth(
|
|||||||
$roles = undef,
|
$roles = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class zaqar::keystone::auth_websocket(
|
|||||||
$service_description = 'Openstack messaging websocket Service',
|
$service_description = 'Openstack messaging websocket Service',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ class zaqar::keystone::authtoken(
|
|||||||
$service_token_roles_required = $::os_service_default,
|
$service_token_roles_required = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
if is_service_default($password) {
|
||||||
fail('Please set password for Zaqar service user')
|
fail('Please set password for Zaqar service user')
|
||||||
|
@ -37,7 +37,7 @@ class zaqar::keystone::trust(
|
|||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'trustee/username': value => $username;
|
'trustee/username': value => $username;
|
||||||
|
@ -123,7 +123,7 @@ class zaqar::logging(
|
|||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
oslo::log { 'zaqar_config':
|
oslo::log { 'zaqar_config':
|
||||||
logging_context_format_string => $logging_context_format_string,
|
logging_context_format_string => $logging_context_format_string,
|
||||||
|
@ -71,7 +71,7 @@ class zaqar::management::mongodb(
|
|||||||
$reconnect_sleep = $::os_service_default,
|
$reconnect_sleep = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:management_store:mongodb/uri': value => $uri, secret => true;
|
'drivers:management_store:mongodb/uri': value => $uri, secret => true;
|
||||||
|
@ -7,7 +7,7 @@ class zaqar::management::sqlalchemy(
|
|||||||
$uri,
|
$uri,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:management_store:sqlalchemy/uri': value => $uri, secret => true;
|
'drivers:management_store:sqlalchemy/uri': value => $uri, secret => true;
|
||||||
|
@ -78,7 +78,7 @@ class zaqar::messaging::mongodb(
|
|||||||
$partitions = $::os_service_default,
|
$partitions = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:message_store:mongodb/uri': value => $uri, secret => true;
|
'drivers:message_store:mongodb/uri': value => $uri, secret => true;
|
||||||
|
@ -20,7 +20,7 @@ class zaqar::messaging::redis(
|
|||||||
$reconnect_sleep = $::os_service_default,
|
$reconnect_sleep = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:message_store:redis/uri': value => $uri, secret => true;
|
'drivers:message_store:redis/uri': value => $uri, secret => true;
|
||||||
|
@ -11,7 +11,7 @@ class zaqar::messaging::swift(
|
|||||||
$auth_url = $::os_service_default,
|
$auth_url = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:message_store:swift/uri': value => $uri, secret => true;
|
'drivers:message_store:swift/uri': value => $uri, secret => true;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Parameters for puppet-zaqar
|
# Parameters for puppet-zaqar
|
||||||
#
|
#
|
||||||
class zaqar::params {
|
class zaqar::params {
|
||||||
include ::openstacklib::defaults
|
include openstacklib::defaults
|
||||||
|
|
||||||
$pyvers = $::openstacklib::defaults::pyvers
|
$pyvers = $::openstacklib::defaults::pyvers
|
||||||
$pyver3 = $::openstacklib::defaults::pyver3
|
$pyver3 = $::openstacklib::defaults::pyver3
|
||||||
|
@ -28,8 +28,8 @@ class zaqar::policy (
|
|||||||
$policy_path = '/etc/zaqar/policy.json',
|
$policy_path = '/etc/zaqar/policy.json',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
include ::zaqar::params
|
include zaqar::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
|
||||||
|
@ -26,10 +26,10 @@ class zaqar::server(
|
|||||||
$service_name = $::zaqar::params::service_name,
|
$service_name = $::zaqar::params::service_name,
|
||||||
) inherits zaqar::params {
|
) inherits zaqar::params {
|
||||||
|
|
||||||
include ::zaqar
|
include zaqar
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
include ::zaqar::params
|
include zaqar::params
|
||||||
include ::zaqar::policy
|
include zaqar::policy
|
||||||
|
|
||||||
if $enabled {
|
if $enabled {
|
||||||
if $manage_service {
|
if $manage_service {
|
||||||
@ -51,7 +51,7 @@ class zaqar::server(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
include ::apache::params
|
include apache::params
|
||||||
service { $::zaqar::params::service_name:
|
service { $::zaqar::params::service_name:
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::zaqar::params::service_name,
|
name => $::zaqar::params::service_name,
|
||||||
|
@ -16,9 +16,9 @@ define zaqar::server_instance(
|
|||||||
$enabled = true,
|
$enabled = true,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar
|
include zaqar
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
include ::zaqar::params
|
include zaqar::params
|
||||||
|
|
||||||
if $enabled {
|
if $enabled {
|
||||||
$service_ensure = 'running'
|
$service_ensure = 'running'
|
||||||
|
@ -28,7 +28,7 @@ class zaqar::transport::websocket(
|
|||||||
$notification_port = $::os_service_default,
|
$notification_port = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:transport:websocket/bind': value => $bind;
|
'drivers:transport:websocket/bind': value => $bind;
|
||||||
|
@ -13,7 +13,7 @@ class zaqar::transport::wsgi(
|
|||||||
$port = $::os_service_default,
|
$port = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
|
|
||||||
zaqar_config {
|
zaqar_config {
|
||||||
'drivers:transport:wsgi/bind': value => $bind;
|
'drivers:transport:wsgi/bind': value => $bind;
|
||||||
|
@ -119,12 +119,12 @@ class zaqar::wsgi::apache (
|
|||||||
$custom_wsgi_process_options = {},
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::zaqar::deps
|
include zaqar::deps
|
||||||
include ::zaqar::params
|
include zaqar::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 { 'zaqar_wsgi':
|
::openstacklib::wsgi::apache { 'zaqar_wsgi':
|
||||||
|
@ -6,13 +6,13 @@ describe 'swift zaqar' do
|
|||||||
|
|
||||||
it 'zaqar with swift should work with no errors' do
|
it 'zaqar with swift 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::mysql
|
include openstack_integration::mysql
|
||||||
include ::openstack_integration::keystone
|
include openstack_integration::keystone
|
||||||
include ::openstack_integration::swift
|
include openstack_integration::swift
|
||||||
include ::openstack_integration::memcached
|
include openstack_integration::memcached
|
||||||
include ::openstack_integration::zaqar
|
include openstack_integration::zaqar
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
describe 'zaqar' do
|
describe 'zaqar' do
|
||||||
shared_examples 'zaqar' do
|
shared_examples 'zaqar' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'password',
|
password =>'password',
|
||||||
}"
|
}"
|
||||||
end
|
end
|
||||||
|
@ -4,10 +4,10 @@ describe 'zaqar::management::mongodb' do
|
|||||||
|
|
||||||
shared_examples_for 'zaqar::management::mongodb' do
|
shared_examples_for 'zaqar::management::mongodb' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class { '::zaqar':
|
class { 'zaqar':
|
||||||
}"
|
}"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -4,10 +4,10 @@ describe 'zaqar::management::sqlalchemy' do
|
|||||||
|
|
||||||
shared_examples_for 'zaqar::management::sqlalchemy' do
|
shared_examples_for 'zaqar::management::sqlalchemy' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class { '::zaqar':
|
class { 'zaqar':
|
||||||
management_store =>'sqlalchemy',
|
management_store =>'sqlalchemy',
|
||||||
}"
|
}"
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@ describe 'zaqar::messaging::mongodb' do
|
|||||||
|
|
||||||
shared_examples_for 'zaqar::messaging::mongodb' do
|
shared_examples_for 'zaqar::messaging::mongodb' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class { '::zaqar':
|
class { 'zaqar':
|
||||||
}"
|
}"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -4,10 +4,10 @@ describe 'zaqar::messaging::redis' do
|
|||||||
|
|
||||||
shared_examples_for 'zaqar::messaging::redis' do
|
shared_examples_for 'zaqar::messaging::redis' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class { '::zaqar':
|
class { 'zaqar':
|
||||||
message_store =>'redis',
|
message_store =>'redis',
|
||||||
}"
|
}"
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@ describe 'zaqar::messaging::swift' do
|
|||||||
|
|
||||||
shared_examples_for 'zaqar::messaging::swift' do
|
shared_examples_for 'zaqar::messaging::swift' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class { '::zaqar':
|
class { 'zaqar':
|
||||||
message_store =>'swift',
|
message_store =>'swift',
|
||||||
}"
|
}"
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ describe 'zaqar::server' do
|
|||||||
shared_examples_for 'zaqar::server' do
|
shared_examples_for 'zaqar::server' do
|
||||||
describe 'with a zaqar server enabled' do
|
describe 'with a zaqar server enabled' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class {'::zaqar': }"
|
class {'::zaqar': }"
|
||||||
|
@ -5,7 +5,7 @@ describe 'zaqar::server_instance' do
|
|||||||
let(:title) { '1' }
|
let(:title) { '1' }
|
||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { '::zaqar::keystone::authtoken':
|
"class { 'zaqar::keystone::authtoken':
|
||||||
password =>'foo',
|
password =>'foo',
|
||||||
}
|
}
|
||||||
class {'::zaqar': }"
|
class {'::zaqar': }"
|
||||||
|
Loading…
Reference in New Issue
Block a user