From 56a58ad3bd37d605677dfcba07807cd7d8a8df7e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 19 Jan 2024 10:48:25 +0900 Subject: [PATCH] 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 --- lib/puppet/type/ceph_config.rb | 6 ++++-- .../deprecate-ceph_config-file_path-eda54eee16f5dd7a.yaml | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/deprecate-ceph_config-file_path-eda54eee16f5dd7a.yaml diff --git a/lib/puppet/type/ceph_config.rb b/lib/puppet/type/ceph_config.rb index dcfaeede..c4fba452 100644 --- a/lib/puppet/type/ceph_config.rb +++ b/lib/puppet/type/ceph_config.rb @@ -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 diff --git a/releasenotes/notes/deprecate-ceph_config-file_path-eda54eee16f5dd7a.yaml b/releasenotes/notes/deprecate-ceph_config-file_path-eda54eee16f5dd7a.yaml new file mode 100644 index 00000000..080f3614 --- /dev/null +++ b/releasenotes/notes/deprecate-ceph_config-file_path-eda54eee16f5dd7a.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``file_path`` property of the ``ceph_config`` resource type has been + deprecated.