Remove deprecated keystone::service

This defined resource type was deprecated during the past cycle[1] and
can be removed.

[1] 05c5605e98

Change-Id: Ib4c7565462e32be2d4dab4b0c538410ad98aefaf
This commit is contained in:
Takashi Kajinami 2022-11-25 10:39:09 +09:00
parent b99810d6f9
commit 76505f1c12
3 changed files with 4 additions and 107 deletions

View File

@ -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',
}
}

View File

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

View File

@ -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