Move openstackclient install to keystone::client
Openstackclient should be installed in the client class, not the main class. It should be possible to use keystone as a client without the main class. For example, it may be necessary to create cinder keystone endpoints on a Cinder node, but not require all of Keystone. Change-Id: Ic9e688d698adffb24f99e9d75a8754391940a7b4 Partial-Bug: #1479317
This commit is contained in:
parent
f654d3cd9b
commit
ff89c950a0
@ -16,4 +16,12 @@ class keystone::client (
|
||||
ensure => $ensure,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
if $ensure == 'present' {
|
||||
include '::openstacklib::openstackclient'
|
||||
} else {
|
||||
class { '::openstacklib::openstackclient':
|
||||
package_ensure => $ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -539,10 +539,10 @@ class keystone(
|
||||
tag => ['openstack', 'keystone-package'],
|
||||
}
|
||||
if $client_package_ensure == 'present' {
|
||||
include '::openstacklib::openstackclient'
|
||||
include '::keystone::client'
|
||||
} else {
|
||||
class { '::openstacklib::openstackclient':
|
||||
package_ensure => $client_package_ensure,
|
||||
class { '::keystone::client':
|
||||
ensure => $client_package_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,10 @@ describe 'keystone::client' do
|
||||
'ensure' => 'present',
|
||||
'tag' => 'openstack'
|
||||
) }
|
||||
it { is_expected.to contain_package('python-openstackclient').with(
|
||||
'ensure' => 'present',
|
||||
'tag' => 'openstack',
|
||||
) }
|
||||
end
|
||||
|
||||
describe "with specified version" do
|
||||
|
@ -110,9 +110,8 @@ describe 'keystone' do
|
||||
'tag' => ['openstack', 'keystone-package'],
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_package('python-openstackclient').with(
|
||||
it { is_expected.to contain_class('keystone::client').with(
|
||||
'ensure' => param_hash['client_package_ensure'],
|
||||
'tag' => 'openstack',
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_group('keystone').with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user