Implement Client class
Install ceilometerclient (aodhclient does not exist yet): * manifest * unit tests * acceptance tests * example manifest Change-Id: Ib644bd0896af71b5fd0379236c7650588fd407b2
This commit is contained in:
parent
9510ce46e4
commit
78af0f02c3
|
@ -13,3 +13,4 @@ class { '::aodh::auth':
|
|||
auth_password => 'a_big_secret',
|
||||
}
|
||||
class { '::aodh::evaluator': }
|
||||
class { '::aodh::client': }
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Installs the aodh python library.
|
||||
#
|
||||
# == parameters
|
||||
# [*ensure*]
|
||||
# ensure state for pachage.
|
||||
#
|
||||
class aodh::client (
|
||||
$ensure = 'present'
|
||||
) {
|
||||
|
||||
include ::aodh::params
|
||||
|
||||
# there is no aodhclient yet
|
||||
package { 'python-ceilometerclient':
|
||||
ensure => $ensure,
|
||||
name => $::aodh::params::client_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
class aodh::params {
|
||||
|
||||
$client_package_name = 'python-ceilometerclient'
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
$common_package_name = 'openstack-aodh-common'
|
||||
|
|
|
@ -123,6 +123,7 @@ describe 'basic aodh' do
|
|||
auth_url => 'http://127.0.0.1:5000/v2.0',
|
||||
auth_password => 'a_big_secret',
|
||||
}
|
||||
class { '::aodh::client': }
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
warning('aodh-evaluator cannot be run on ubuntu system, package is broken. See LP#1508463')
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'aodh::client' do
|
||||
|
||||
shared_examples_for 'aodh client' do
|
||||
|
||||
it { is_expected.to contain_class('aodh::params') }
|
||||
|
||||
it 'installs aodh client package' do
|
||||
is_expected.to contain_package('python-ceilometerclient').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-ceilometerclient',
|
||||
:tag => 'openstack',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'aodh client'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'aodh client'
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue