Convert all class usage to relative names
Change-Id: Ib5f6d1bea7dfe4602d7310a3d645f715297a1116
This commit is contained in:
parent
97d4c1897c
commit
f62471ac9c
@ -15,46 +15,46 @@
|
|||||||
require => Class['::rabbitmq'],
|
require => Class['::rabbitmq'],
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::db::mysql':
|
class { 'magnum::db::mysql':
|
||||||
password => 'magnum',
|
password => 'magnum',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::db':
|
class { 'magnum::db':
|
||||||
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
|
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::keystone::domain':
|
class { 'magnum::keystone::domain':
|
||||||
domain_password => 'oh_my_no_secret',
|
domain_password => 'oh_my_no_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::keystone::authtoken':
|
class { 'magnum::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::api':
|
class { 'magnum::api':
|
||||||
host => '127.0.0.1',
|
host => '127.0.0.1',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::keystone::auth':
|
class { 'magnum::keystone::auth':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
public_url => 'http://127.0.0.1:9511/v1',
|
public_url => 'http://127.0.0.1:9511/v1',
|
||||||
internal_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',
|
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',
|
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672',
|
||||||
rabbit_use_ssl => false,
|
rabbit_use_ssl => false,
|
||||||
notification_driver => 'messagingv2',
|
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'
|
cert_manager_type => 'local'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,9 +80,9 @@ class magnum::api(
|
|||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
) inherits magnum::params {
|
) inherits magnum::params {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
include ::magnum::policy
|
include magnum::policy
|
||||||
|
|
||||||
if $enabled_ssl {
|
if $enabled_ssl {
|
||||||
if is_service_default($ssl_cert_file) {
|
if is_service_default($ssl_cert_file) {
|
||||||
@ -94,7 +94,7 @@ class magnum::api(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $sync_db {
|
if $sync_db {
|
||||||
include ::magnum::db::sync
|
include magnum::db::sync
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure API conf
|
# Configure API conf
|
||||||
@ -133,7 +133,7 @@ class magnum::api(
|
|||||||
tag => ['magnum-service', 'magnum-db-sync-service'],
|
tag => ['magnum-service', 'magnum-db-sync-service'],
|
||||||
}
|
}
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
include ::apache::params
|
include apache::params
|
||||||
service { 'magnum-api':
|
service { 'magnum-api':
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::magnum::params::api_service,
|
name => $::magnum::params::api_service,
|
||||||
@ -147,6 +147,6 @@ class magnum::api(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::magnum::keystone::authtoken
|
include magnum::keystone::authtoken
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ class magnum::certificates (
|
|||||||
$cert_manager_type = $::os_service_default,
|
$cert_manager_type = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
magnum_config { 'certificates/cert_manager_type':
|
magnum_config { 'certificates/cert_manager_type':
|
||||||
value => $cert_manager_type;
|
value => $cert_manager_type;
|
||||||
|
@ -12,8 +12,8 @@ class magnum::client (
|
|||||||
$package_ensure = 'present'
|
$package_ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
package { 'python-magnumclient':
|
package { 'python-magnumclient':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
@ -38,13 +38,13 @@ class magnum::clients (
|
|||||||
$key_file = $::os_service_default,
|
$key_file = $::os_service_default,
|
||||||
$insecure = false
|
$insecure = false
|
||||||
) {
|
) {
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
include ::magnum::clients::barbican
|
include magnum::clients::barbican
|
||||||
include ::magnum::clients::cinder
|
include magnum::clients::cinder
|
||||||
include ::magnum::clients::glance
|
include magnum::clients::glance
|
||||||
include ::magnum::clients::heat
|
include magnum::clients::heat
|
||||||
include ::magnum::clients::magnum
|
include magnum::clients::magnum
|
||||||
include ::magnum::clients::neutron
|
include magnum::clients::neutron
|
||||||
include ::magnum::clients::nova
|
include magnum::clients::nova
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,8 @@ class magnum::clients::barbican(
|
|||||||
$endpoint_type = $magnum::clients::endpoint_type,
|
$endpoint_type = $magnum::clients::endpoint_type,
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'barbican_client/region_name': value => $region_name;
|
'barbican_client/region_name': value => $region_name;
|
||||||
|
@ -13,8 +13,8 @@ class magnum::clients::cinder(
|
|||||||
$region_name = $magnum::clients::region_name,
|
$region_name = $magnum::clients::region_name,
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'cinder_client/region_name': value => $region_name;
|
'cinder_client/region_name': value => $region_name;
|
||||||
|
@ -45,8 +45,8 @@ class magnum::clients::glance(
|
|||||||
$insecure = $magnum::clients::insecure
|
$insecure = $magnum::clients::insecure
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'glance_client/region_name': value => $region_name;
|
'glance_client/region_name': value => $region_name;
|
||||||
|
@ -45,8 +45,8 @@ class magnum::clients::heat(
|
|||||||
$insecure = $magnum::clients::insecure
|
$insecure = $magnum::clients::insecure
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'heat_client/region_name': value => $region_name;
|
'heat_client/region_name': value => $region_name;
|
||||||
|
@ -19,8 +19,8 @@ class magnum::clients::magnum(
|
|||||||
$endpoint_type = $magnum::clients::endpoint_type,
|
$endpoint_type = $magnum::clients::endpoint_type,
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'magnum_client/region_name': value => $region_name;
|
'magnum_client/region_name': value => $region_name;
|
||||||
|
@ -39,8 +39,8 @@ class magnum::clients::neutron(
|
|||||||
$insecure = $magnum::clients::insecure
|
$insecure = $magnum::clients::insecure
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'neutron_client/region_name': value => $region_name;
|
'neutron_client/region_name': value => $region_name;
|
||||||
|
@ -45,8 +45,8 @@ class magnum::clients::nova(
|
|||||||
$insecure = $magnum::clients::insecure
|
$insecure = $magnum::clients::insecure
|
||||||
){
|
){
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
magnum_config {
|
magnum_config {
|
||||||
'nova_client/region_name': value => $region_name;
|
'nova_client/region_name': value => $region_name;
|
||||||
|
@ -38,9 +38,9 @@ class magnum::conductor(
|
|||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::db
|
include magnum::db
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
# Install package
|
# Install package
|
||||||
package { 'magnum-conductor':
|
package { 'magnum-conductor':
|
||||||
@ -72,6 +72,6 @@ class magnum::conductor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::magnum::keystone::authtoken
|
include magnum::keystone::authtoken
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class magnum::config (
|
|||||||
$magnum_api_paste_ini = {},
|
$magnum_api_paste_ini = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $magnum_config)
|
validate_legacy(Hash, 'validate_hash', $magnum_config)
|
||||||
validate_legacy(Hash, 'validate_hash', $magnum_api_paste_ini)
|
validate_legacy(Hash, 'validate_hash', $magnum_api_paste_ini)
|
||||||
|
@ -62,7 +62,7 @@ class magnum::db (
|
|||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::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 magnum::db::mysql(
|
|||||||
$allowed_hosts = undef
|
$allowed_hosts = undef
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
validate_legacy(String, 'validate_string', $password)
|
validate_legacy(String, 'validate_string', $password)
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class magnum::db::postgresql(
|
|||||||
$privileges = 'ALL',
|
$privileges = 'ALL',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
::openstacklib::db::postgresql { 'magnum':
|
::openstacklib::db::postgresql { 'magnum':
|
||||||
password_hash => postgresql_password($user, $password),
|
password_hash => postgresql_password($user, $password),
|
||||||
|
@ -22,7 +22,7 @@ class magnum::db::sync(
|
|||||||
$exec_path = '/usr/bin',
|
$exec_path = '/usr/bin',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
exec { 'magnum-db-sync':
|
exec { 'magnum-db-sync':
|
||||||
command => "magnum-db-manage ${extra_params} upgrade head",
|
command => "magnum-db-manage ${extra_params} upgrade head",
|
||||||
|
@ -220,10 +220,10 @@ class magnum(
|
|||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
include ::magnum::policy
|
include magnum::policy
|
||||||
include ::magnum::db
|
include magnum::db
|
||||||
|
|
||||||
package { 'magnum-common':
|
package { 'magnum-common':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
@ -78,7 +78,7 @@ class magnum::keystone::auth (
|
|||||||
$internal_url = 'http://127.0.0.1:9511/v1',
|
$internal_url = 'http://127.0.0.1:9511/v1',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
$real_service_name = pick($service_name, $auth_name)
|
$real_service_name = pick($service_name, $auth_name)
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ class magnum::keystone::authtoken(
|
|||||||
$service_token_roles_required = $::os_service_default,
|
$service_token_roles_required = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
if is_service_default($password) {
|
||||||
fail('Please set password for magnum service user')
|
fail('Please set password for magnum service user')
|
||||||
|
@ -79,8 +79,8 @@ class magnum::keystone::domain (
|
|||||||
$keystone_interface = 'public'
|
$keystone_interface = 'public'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
if $manage_domain {
|
if $manage_domain {
|
||||||
ensure_resource('keystone_domain', $domain_name, {
|
ensure_resource('keystone_domain', $domain_name, {
|
||||||
|
@ -123,7 +123,7 @@ class magnum::logging(
|
|||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
oslo::log { 'magnum_config':
|
oslo::log { 'magnum_config':
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Parameters for puppet-magnum
|
# Parameters for puppet-magnum
|
||||||
#
|
#
|
||||||
class magnum::params {
|
class magnum::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 magnum::policy (
|
|||||||
$policy_path = '/etc/magnum/policy.json',
|
$policy_path = '/etc/magnum/policy.json',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::params
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $policies)
|
validate_legacy(Hash, 'validate_hash', $policies)
|
||||||
|
|
||||||
|
@ -115,12 +115,12 @@ class magnum::wsgi::apache (
|
|||||||
$custom_wsgi_process_options = {},
|
$custom_wsgi_process_options = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::magnum::deps
|
include magnum::deps
|
||||||
include ::magnum::params
|
include magnum::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 { 'magnum_wsgi':
|
::openstacklib::wsgi::apache { 'magnum_wsgi':
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
@ -6,11 +6,11 @@ describe 'basic magnum' 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
|
||||||
|
|
||||||
rabbitmq_vhost { '/magnum':
|
rabbitmq_vhost { '/magnum':
|
||||||
provider => 'rabbitmqctl',
|
provider => 'rabbitmqctl',
|
||||||
@ -31,53 +31,53 @@ describe 'basic magnum' do
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Magnum resources
|
# Magnum resources
|
||||||
class { '::magnum::keystone::auth':
|
class { 'magnum::keystone::auth':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
public_url => 'http://127.0.0.1:9511/v1',
|
public_url => 'http://127.0.0.1:9511/v1',
|
||||||
internal_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',
|
admin_url => 'http://127.0.0.1:9511/v1',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::keystone::authtoken':
|
class { 'magnum::keystone::authtoken':
|
||||||
password => 'a_big_secret',
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::db::mysql':
|
class { 'magnum::db::mysql':
|
||||||
password => 'magnum',
|
password => 'magnum',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::logging':
|
class { 'magnum::logging':
|
||||||
debug => true,
|
debug => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::db':
|
class { 'magnum::db':
|
||||||
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
|
database_connection => 'mysql://magnum:magnum@127.0.0.1/magnum',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::keystone::domain':
|
class { 'magnum::keystone::domain':
|
||||||
domain_password => 'oh_my_no_secret',
|
domain_password => 'oh_my_no_secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum':
|
class { 'magnum':
|
||||||
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672/',
|
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672/',
|
||||||
rabbit_use_ssl => false,
|
rabbit_use_ssl => false,
|
||||||
notification_driver => 'messagingv2',
|
notification_driver => 'messagingv2',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::api':
|
class { 'magnum::api':
|
||||||
service_name => 'httpd',
|
service_name => 'httpd',
|
||||||
}
|
}
|
||||||
include ::apache
|
include apache
|
||||||
include ::magnum::wsgi::apache
|
include magnum::wsgi::apache
|
||||||
|
|
||||||
class { '::magnum::conductor': }
|
class { 'magnum::conductor': }
|
||||||
class { '::magnum::client': }
|
class { 'magnum::client': }
|
||||||
|
|
||||||
class { '::magnum::certificates':
|
class { 'magnum::certificates':
|
||||||
cert_manager_type => 'local'
|
cert_manager_type => 'local'
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::magnum::clients': }
|
class { 'magnum::clients': }
|
||||||
EOS
|
EOS
|
||||||
# Run it twice to test for idempotency
|
# Run it twice to test for idempotency
|
||||||
apply_manifest(pp, :catch_failures => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
|
@ -95,11 +95,11 @@ describe 'magnum::api' do
|
|||||||
|
|
||||||
shared_examples 'magnum-api wsgi' do
|
shared_examples 'magnum-api wsgi' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"include ::magnum
|
"include magnum
|
||||||
class { 'magnum::keystone::authtoken':
|
class { 'magnum::keystone::authtoken':
|
||||||
password => 'secret',
|
password => 'secret',
|
||||||
}
|
}
|
||||||
include ::apache"
|
include apache"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
|
Loading…
Reference in New Issue
Block a user