Deprecate file_path property

When customizing this property, purging and prefetch does not work.

It seems the property was added mainly for testing, thus is not very
much indented for production use case.

This also drops the logic for windows which has never been supported.

Change-Id: I2856b87e4cb3f56646b12e2bba98179ccf6e1089
This commit is contained in:
Takashi Kajinami 2024-01-19 10:48:25 +09:00
parent db8e683898
commit 56a58ad3bd
2 changed files with 9 additions and 2 deletions

View File

@ -29,9 +29,11 @@ Puppet::Type.newtype(:ceph_config) do
# Note: purge will not work on over-ridden file_path
# lifted from ini_file
newparam(:path) do
desc 'A file path to over ride the default file path if necessary'
desc 'A file path to over ride the default file path if necessary (DEPRECATED)'
validate do |value|
unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))
warning('The path property is deprecated and will be removed in a future release')
unless value =~ /^\//
raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'")
end
end

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``file_path`` property of the ``ceph_config`` resource type has been
deprecated.