Merge "Debian is using Python 3"
This commit is contained in:
commit
540c1c4615
@ -653,6 +653,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
|
||||
|
||||
package { 'python-nova':
|
||||
ensure => $ensure_package,
|
||||
name => $::nova::params::python_package_name,
|
||||
tag => ['openstack', 'nova-package'],
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,11 @@
|
||||
class nova::params {
|
||||
include ::openstacklib::defaults
|
||||
$group = 'nova'
|
||||
if ($::os_package_type == 'debian') {
|
||||
$pyvers = '3'
|
||||
} else {
|
||||
$pyvers = ''
|
||||
}
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
# package names
|
||||
@ -12,6 +17,7 @@ class nova::params {
|
||||
$placement_package_name = 'openstack-nova-placement-api'
|
||||
$cells_package_name = 'openstack-nova-cells'
|
||||
$common_package_name = 'openstack-nova-common'
|
||||
$python_package_name = 'python-nova'
|
||||
$compute_package_name = 'openstack-nova-compute'
|
||||
$conductor_package_name = 'openstack-nova-conductor'
|
||||
$consoleauth_package_name = 'openstack-nova-console'
|
||||
@ -79,6 +85,7 @@ class nova::params {
|
||||
$placement_package_name = 'nova-placement-api'
|
||||
$cells_package_name = 'nova-cells'
|
||||
$common_package_name = 'nova-common'
|
||||
$python_package_name = "python${pyvers}-nova"
|
||||
$compute_package_name = 'nova-compute'
|
||||
$conductor_package_name = 'nova-conductor'
|
||||
$consoleauth_package_name = 'nova-consoleauth'
|
||||
|
@ -9,6 +9,7 @@ describe 'nova::client' do
|
||||
it 'installs nova client package' do
|
||||
is_expected.to contain_package('python-novaclient').with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:client_package_name],
|
||||
:tag => ['openstack', 'nova-support-package']
|
||||
)
|
||||
end
|
||||
@ -22,6 +23,19 @@ describe 'nova::client' do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:os_package_type] == 'debian'
|
||||
{ :client_package_name => 'python3-novaclient' }
|
||||
else
|
||||
{ :client_package_name => 'python-novaclient' }
|
||||
end
|
||||
when 'RedHat'
|
||||
{ :client_package_name => 'python-novaclient' }
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'nova client'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user