Add support of ironic-inspector-client
Change-Id: Ibe76a9535f6fab9cbd20abed55318047a6e83152
This commit is contained in:
parent
804bb619d5
commit
fc2adf7fb8
24
manifests/inspector/client.pp
Normal file
24
manifests/inspector/client.pp
Normal file
@ -0,0 +1,24 @@
|
||||
# Class ironic::inspector::client
|
||||
#
|
||||
# Manages the ironic inspector client package on systems
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) The state of the package
|
||||
# Defaults to present
|
||||
#
|
||||
class ironic::inspector::client (
|
||||
$package_ensure = present
|
||||
) {
|
||||
|
||||
include ::ironic::deps
|
||||
include ::ironic::params
|
||||
|
||||
package { 'python-ironic-inspector-client':
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::inspector_client_package,
|
||||
tag => ['openstack', 'ironic-support-package'],
|
||||
}
|
||||
|
||||
}
|
@ -27,6 +27,7 @@ class ironic::params {
|
||||
$inspector_dbsync_command =
|
||||
'ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade'
|
||||
$client_package = 'python-ironicclient'
|
||||
$inspector_client_package = 'python-ironic-inspector-client'
|
||||
$lib_package_name = 'python-ironic-lib'
|
||||
|
||||
case $::osfamily {
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add support of ironic-inspector-client.
|
56
spec/classes/ironic_inspector_client_spec.rb
Normal file
56
spec/classes/ironic_inspector_client_spec.rb
Normal file
@ -0,0 +1,56 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# Unit tests for ironic::inspector::client
|
||||
#
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'ironic::inspector::client' do
|
||||
|
||||
let :params do
|
||||
{}
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
{ :package_ensure => 'present' }
|
||||
end
|
||||
|
||||
shared_examples_for 'inspector client' do
|
||||
let :p do
|
||||
default_params.merge(params)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('ironic::deps') }
|
||||
it { is_expected.to contain_class('ironic::params') }
|
||||
|
||||
it 'installs ironic inspector client package' do
|
||||
is_expected.to contain_package('python-ironic-inspector-client').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-ironic-inspector-client',
|
||||
:tag => ['openstack', 'ironic-support-package'],
|
||||
)
|
||||
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 'inspector client'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user