Merge "Remove deprecated keystone::service"

changes/23/869823/1
Zuul 2 months ago committed by Gerrit Code Review
commit c66ba58ecd

@ -1,48 +0,0 @@
# == Class keystone::service
#
# DEPRECATED !!
# Encapsulates the keystone service to a class.
#
# === Parameters
#
# [*ensure*]
# (Optional) The desired state of the keystone service
# Defaults to undef
#
# [*service_name*]
# (Optional) The name of the keystone service
# Defaults to $::keystone::params::service_name
#
# [*enable*]
# (Optional) Whether to enable the keystone service
# Defaults to true
#
# [*hasstatus*]
# (Optional) Whether the keystone service has status
# Defaults to true
#
# [*hasrestart*]
# (Optional) Whether the keystone service has restart
# Defaults to true
#
class keystone::service (
$ensure = undef,
$service_name = $::keystone::params::service_name,
$enable = true,
$hasstatus = true,
$hasrestart = true,
) inherits keystone::params {
include keystone::deps
warning('The keystone::service class is deprecated and will be removed in a future release,')
service { 'keystone':
ensure => $ensure,
name => $service_name,
enable => $enable,
hasstatus => $hasstatus,
hasrestart => $hasrestart,
tag => 'keystone-service',
}
}

@ -0,0 +1,4 @@
---
upgrade:
- |
The ``keystone::service`` defined resource type has been removed.

@ -1,59 +0,0 @@
require 'spec_helper'
describe 'keystone::service' do
shared_examples 'keystone::service' do
let :params do
{}
end
context 'with default parameters' do
it { is_expected.to contain_service('keystone').with(
:ensure => nil,
:name => platform_params[:service_name],
:enable => true,
:hasstatus => true,
:hasrestart => true,
:tag => 'keystone-service',
)}
end
context 'with overriden parameters' do
before do
params.merge!(
:ensure => 'present',
:enable => false,
:hasstatus => false,
:hasrestart => false
)
end
it { is_expected.to contain_service('keystone').with(
:ensure => 'present',
:name => platform_params[:service_name],
:enable => false,
:hasstatus => false,
:hasrestart => false,
)}
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
if facts[:osfamily ] == 'RedHat'
{ :service_name => 'openstack-keystone' }
else
{ :service_name => 'keystone' }
end
end
it_behaves_like 'keystone::service'
end
end
end
Loading…
Cancel
Save