summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Williams <bruce@codefluency.com>2010-03-14 17:02:14 -0700
committerBruce Williams <bruce@codefluency.com>2010-03-14 17:02:14 -0700
commit52e078444a12d47530a4299d0e9d60b86066c76e (patch)
treed6c1c5b8129932cffadf40ce6b34d03eda32a923
parentdabaf6e10e23b106a4ba55c8767908ef508ebe15 (diff)
filesystem_type feature (for svn's --fstype)
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb1
-rw-r--r--lib/puppet/type/vcsrepo.rb8
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 09fdd0e..7cdd157 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -7,6 +7,7 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
:svnadmin => 'svnadmin'
defaultfor :svn => :exists
+ has_features :filesystem_types
def create
if !@resource.value(:source)
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index a722152..69c7f74 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -11,6 +11,8 @@ Puppet::Type.newtype(:vcsrepo) do
and those with working copies",
:methods => [:bare_exists?, :working_copy_exists?]
+ feature :filesystem_types,
+ "The provider supports different filesystem types"
ensurable do
@@ -62,8 +64,8 @@ Puppet::Type.newtype(:vcsrepo) do
desc "The source URI for the repository"
end
- newparam(:fstype) do
- desc "Filesystem type (for providers that support it, eg subversion)"
+ newparam(:fstype, :required_features => [:filesystem_types]) do
+ desc "Filesystem type"
end
newproperty(:revision) do
@@ -72,7 +74,7 @@ Puppet::Type.newtype(:vcsrepo) do
end
newparam :compression, :required_features => [:gzip_compression] do
- desc "Compression level (used by CVS)"
+ desc "Compression level"
validate do |amount|
unless Integer(amount).between?(0, 6)
raise ArgumentError, "Unsupported compression level: #{amount} (expected 0-6)"