[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Derek Olsen derek.olsen at e-hps.com
Tue May 10 08:02:36 UTC 2011


The following commit has been merged in the experimental branch:
commit c5a1ca0b34a57366415df60099ab0918a7579469
Author: Derek Olsen <derek.olsen at e-hps.com>
Date:   Wed Nov 24 11:11:43 2010 -0800

    (#5391) Include additional zfs properties
    
    We added the following zfs properties to the zfs provider
    
    :recordsize, :aclmode, :aclinherit, :primarycache, :secondarycache
    
    Currently zfs users have to chain an exec to the zfs filesystem creation and the inclusion of these properties would allow puppet to set them natively.

diff --git a/lib/puppet/provider/zfs/solaris.rb b/lib/puppet/provider/zfs/solaris.rb
index 85d054f..9aec9d8 100644
--- a/lib/puppet/provider/zfs/solaris.rb
+++ b/lib/puppet/provider/zfs/solaris.rb
@@ -31,7 +31,7 @@ Puppet::Type.type(:zfs).provide(:solaris) do
     end
   end
 
-  [:mountpoint, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |field|
+  [:mountpoint, :recordsize, :aclmode, :aclinherit, :primarycache, :secondarycache, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |field|
     define_method(field) do
       zfs(:get, "-H", "-o", "value", field, @resource[:name]).strip
     end
diff --git a/lib/puppet/type/zfs.rb b/lib/puppet/type/zfs.rb
index e1a972d..be18ab5 100755
--- a/lib/puppet/type/zfs.rb
+++ b/lib/puppet/type/zfs.rb
@@ -12,6 +12,26 @@ module Puppet
       desc "The mountpoint property."
     end
 
+    newproperty(:recordsize) do
+      desc "The recordsize property."
+    end
+
+    newproperty(:aclmode) do
+      desc "The aclmode property."
+    end
+
+    newproperty(:aclinherit) do
+      desc "The aclinherit property."
+    end
+
+    newproperty(:primarycache) do
+      desc "The primarycache property."
+    end
+
+    newproperty(:secondarycache) do
+      desc "The secondarycache property."
+    end
+
     newproperty(:compression) do
       desc "The compression property."
     end
@@ -33,7 +53,7 @@ module Puppet
     end
 
     newproperty(:snapdir) do
-      desc "The sharenfs property."
+      desc "The snapdir property."
     end
 
     autorequire(:zpool) do
@@ -48,4 +68,3 @@ module Puppet
     end
   end
 end
-
diff --git a/spec/unit/provider/zfs/solaris_spec.rb b/spec/unit/provider/zfs/solaris_spec.rb
index 43a88b1..9d1f364 100755
--- a/spec/unit/provider/zfs/solaris_spec.rb
+++ b/spec/unit/provider/zfs/solaris_spec.rb
@@ -75,7 +75,7 @@ describe provider_class do
 
   end
 
-  [:mountpoint, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |prop|
+  [:mountpoint, :recordsize, :aclmode, :aclinherit, :primarycache, :secondarycache, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |prop|
     describe "when getting the #{prop} value" do
       it "should call zfs with :get, #{prop} and this zfs" do
         @provider.expects(:zfs).with(:get, "-H", "-o", "value", prop, @resource[:name]).returns("value\n")

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list