Introduce cloudkitty::client
This patch aims to add a new class to manage cloudkitty client. Change-Id: I22acb19a956896dada720c64bd42fd65d621a3b8
This commit is contained in:
parent
15b6783438
commit
a40f662c92
|
@ -0,0 +1,24 @@
|
|||
# == Class cloudkitty::client
|
||||
#
|
||||
# Installs the cloudkitty client.
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*ensure*]
|
||||
# (Optional) The state for the cloudkitty client package.
|
||||
# Defaults to 'present'.
|
||||
#
|
||||
class cloudkitty::client (
|
||||
$ensure = 'present'
|
||||
) {
|
||||
|
||||
include ::cloudkitty::deps
|
||||
include ::cloudkitty::params
|
||||
|
||||
package { 'python-cloudkittyclient':
|
||||
ensure => $ensure,
|
||||
name => $::cloudkitty::params::client_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'cloudkitty::client' do
|
||||
|
||||
shared_examples_for 'cloudkitty client' do
|
||||
|
||||
it { is_expected.to contain_class('cloudkitty::deps') }
|
||||
it { is_expected.to contain_class('cloudkitty::params') }
|
||||
|
||||
it 'installs cloudkitty client package' do
|
||||
is_expected.to contain_package('python-cloudkittyclient').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-cloudkittyclient',
|
||||
: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
|
||||
|
||||
it_configures 'cloudkitty client'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue