Add panko client install support

Change-Id: I7a6e8f4eaeb2274cc73e0b1ba22ec5f70c030646
This commit is contained in:
Pradeep Kilambi 2017-08-02 08:23:05 -04:00
parent 9a4393bfd4
commit 84f1545a17
3 changed files with 61 additions and 0 deletions

25
manifests/client.pp Normal file

@ -0,0 +1,25 @@
# == Class: panko::client
#
# Installs the panko python library.
#
# === Parameters:
#
# [*ensure*]
# (Optional) Ensure state for pachage.
# Defaults to 'present'.
#
class panko::client (
$ensure = 'present'
) {
include ::panko::deps
include ::panko::params
package { 'python-pankoclient':
ensure => $ensure,
name => $::panko::params::client_package_name,
tag => 'openstack',
}
}

@ -2,6 +2,7 @@
#
class panko::params {
include ::openstacklib::defaults
$client_package_name = 'python-pankoclient'
case $::osfamily {
'RedHat': {

@ -0,0 +1,35 @@
require 'spec_helper'
describe 'panko::client' do
shared_examples_for 'panko client' do
it { is_expected.to contain_class('panko::deps') }
it { is_expected.to contain_class('panko::params') }
it 'installs panko client package' do
is_expected.to contain_package('python-pankoclient').with(
:ensure => 'present',
:name => platform_params[:client_package_name],
:tag => 'openstack',
)
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
let :platform_params do
{ :client_package_name => 'python-pankoclient' }
end
it_behaves_like 'panko client'
end
end
end