Inherit pyvers from openstacklib::defaults

Change-Id: I1dc1d456c0d086e00c7591943a5e514106c483a9
This commit is contained in:
Tobias Urdin 2019-01-17 21:40:25 +01:00
parent 5bb7a5a7a2
commit 93092f9afd
2 changed files with 4 additions and 19 deletions

View File

@ -5,17 +5,8 @@
class magnum::params {
include ::openstacklib::defaults
if ($::os_package_type == 'debian') {
$pyvers = '3'
$pyver3 = '3'
} elsif ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
$pyver3 = '3.6'
} else {
$pyvers = ''
$pyver3 = '2.7'
}
$pyvers = $::openstacklib::defaults::pyvers
$pyver3 = $::openstacklib::defaults::pyver3
$group = 'magnum'
case $::osfamily {

View File

@ -1,9 +1,7 @@
require 'spec_helper'
describe 'magnum::client' do
shared_examples_for 'magnum client' do
it { is_expected.to contain_class('magnum::deps') }
it { is_expected.to contain_class('magnum::params') }
@ -27,17 +25,13 @@ describe 'magnum::client' do
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-magnumclient' }
else
{ :client_package_name => 'python-magnumclient' }
end
{ :client_package_name => 'python3-magnumclient' }
when 'RedHat'
{ :client_package_name => 'python2-magnumclient' }
end
end
it_configures 'magnum client'
end
end
end