Accept an array for [trust] roles

... because the option accepts a list value.

Change-Id: I5802a8d8f7aad50ecb83f7ad433e83af4d41c2af
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-07-21 03:01:59 +09:00
parent 729ceb812a
commit ee16067abf
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ class magnum::keystone::domain (
'trust/trustee_domain_admin_domain_name': value => $domain_admin_domain_name;
'trust/trustee_domain_admin_domain_id': value => $domain_admin_domain_id;
'trust/trustee_domain_admin_password': value => $domain_password_real, secret => true;
'trust/roles': value => $roles;
'trust/roles': value => join(any2array($roles), ',');
'trust/trustee_keystone_interface': value => $keystone_interface;
'trust/trustee_keystone_region_name': value => $keystone_region_name;
}
+11 -1
View File
@@ -12,7 +12,7 @@ describe 'magnum::keystone::domain' do
:domain_admin_domain_id => '16264508d9b6476da952a3971ca9d4b4',
:domain_admin_email => 'magnum_admin@localhost',
:domain_password => 'domain_passwd',
:roles => 'admin,',
:roles => 'admin',
:keystone_interface => 'public',
:keystone_region_name => 'RegionOne'
}
@@ -52,6 +52,16 @@ describe 'magnum::keystone::domain' do
)
end
context 'when an array is used for roles' do
before do
params.merge!(
:roles => ['admin', 'manager'],
)
end
it { is_expected.to contain_magnum_config('trust/roles').with_value('admin,manager') }
end
context 'when not managing the domain creation' do
before do
params.merge!(