Fix reference to magnum::clients parameters

The magnum::clients::* classes uses magnum::clients parameters by
default but reference is broken unless the classes are included in
a proper order. This change ensures the reference works, by adding
inheritance between classes.

Closes-Bug: #1964452
Change-Id: I5da05b9d3ba2635db7f9170d8e3cab6bf21f8511
This commit is contained in:
Takashi Kajinami 2022-03-10 17:12:12 +09:00
parent d4b442f629
commit 075e120be1
16 changed files with 16 additions and 59 deletions

View File

@ -17,7 +17,7 @@
class magnum::clients::barbican(
$region_name = $magnum::clients::region_name,
$endpoint_type = $magnum::clients::endpoint_type,
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -42,7 +42,7 @@ class magnum::clients::cinder(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -43,7 +43,7 @@ class magnum::clients::glance(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -43,7 +43,7 @@ class magnum::clients::heat(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -17,7 +17,7 @@
class magnum::clients::magnum(
$region_name = $magnum::clients::region_name,
$endpoint_type = $magnum::clients::endpoint_type,
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -37,7 +37,7 @@ class magnum::clients::neutron(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -43,7 +43,7 @@ class magnum::clients::nova(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -37,7 +37,7 @@ class magnum::clients::octavia(
$cert_file = $magnum::clients::cert_file,
$key_file = $magnum::clients::key_file,
$insecure = $magnum::clients::insecure,
){
) inherits magnum::clients {
include magnum::deps
include magnum::params

View File

@ -6,9 +6,7 @@ describe 'magnum::clients::barbican' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
}
{}
end
it { is_expected.to contain_magnum_config('barbican_client/region_name').with_value('RegionOne') }

View File

@ -6,13 +6,7 @@ describe 'magnum::clients::cinder' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false,
}
{}
end
it { is_expected.to contain_magnum_config('cinder_client/region_name').with_value('RegionOne') }

View File

@ -6,14 +6,7 @@ describe 'magnum::clients::glance' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false,
}
{}
end
it { is_expected.to contain_magnum_config('glance_client/region_name').with_value('RegionOne') }
@ -32,7 +25,6 @@ describe 'magnum::clients::glance' do
:cert_file => '/etc/magnum/certs/cert.pem',
:key_file => '/etc/magnum/certs/pri.key',
:insecure => true,
}
end

View File

@ -6,13 +6,7 @@ describe 'magnum::clients::heat' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false,
}
{}
end
it { is_expected.to contain_magnum_config('heat_client/region_name').with_value('RegionOne') }

View File

@ -6,9 +6,7 @@ describe 'magnum::clients::magnum' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
}
{}
end
it { is_expected.to contain_magnum_config('magnum_client/region_name').with_value('RegionOne') }

View File

@ -6,13 +6,7 @@ describe 'magnum::clients::neutron' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false
}
{}
end
it { is_expected.to contain_magnum_config('neutron_client/region_name').with_value('RegionOne') }

View File

@ -6,14 +6,7 @@ describe 'magnum::clients::nova' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false,
}
{}
end
it { is_expected.to contain_magnum_config('nova_client/region_name').with_value('RegionOne') }

View File

@ -6,13 +6,7 @@ describe 'magnum::clients::octavia' do
context 'with default parameters' do
let :params do
{ :region_name => 'RegionOne',
:endpoint_type => 'publicURL',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => false,
}
{}
end
it { is_expected.to contain_magnum_config('octavia_client/region_name').with_value('RegionOne') }