diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2011-03-29 15:30:23 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2011-03-29 15:53:51 -0700 |
| commit | b9982b600871d1df5902935f7415e0eb7416104f (patch) | |
| tree | 09e264f3bbb6cb8197b99d6e155a434babf8323c | |
| parent | 4413c3e6787deb947daf2e40887ebe39f91bc1ab (diff) | |
| parent | 7a325feb8aad7b67c80d57dc82bc9c8232bc7b53 (diff) | |
| download | puppet-b9982b600871d1df5902935f7415e0eb7416104f.tar.gz puppet-b9982b600871d1df5902935f7415e0eb7416104f.tar.xz puppet-b9982b600871d1df5902935f7415e0eb7416104f.zip | |
Merge branch 'feature/master/6144' of https://github.com/ghoneycutt/puppet into next
| -rw-r--r-- | lib/puppet/provider/zfs/solaris.rb | 2 | ||||
| -rw-r--r--[-rwxr-xr-x] | lib/puppet/type/zfs.rb | 110 | ||||
| -rwxr-xr-x | spec/unit/provider/zfs/solaris_spec.rb | 1 |
3 files changed, 93 insertions, 20 deletions
diff --git a/lib/puppet/provider/zfs/solaris.rb b/lib/puppet/provider/zfs/solaris.rb index 9aec9d801..b783f9e01 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, :recordsize, :aclmode, :aclinherit, :primarycache, :secondarycache, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |field| + [:aclinherit, :aclmode, :atime, :canmount, :checksum, :compression, :copies, :devices, :exec, :logbias, :mountpoint, :nbmand, :primarycache, :quota, :readonly, :recordsize, :refquota, :refreservation, :reservation, :secondarycache, :setuid, :shareiscsi, :sharenfs, :sharesmb, :snapdir, :version, :volsize, :vscan, :xattr, :zoned, :vscan].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 7123f8ac9..75f821787 100755..100644 --- a/lib/puppet/type/zfs.rb +++ b/lib/puppet/type/zfs.rb @@ -10,52 +10,124 @@ module Puppet desc "The full name for this filesystem. (including the zpool)" end - newproperty(:mountpoint) do - desc "The mountpoint property." - end - - newproperty(:recordsize) do - desc "The recordsize property." + newproperty(:aclinherit) do + desc "The aclinherit property. Values: discard | noallow | restricted | passthrough | passthrough-x" end newproperty(:aclmode) do - desc "The aclmode property." + desc "The aclmode property. Values: discard | groupmask | passthrough" end - newproperty(:aclinherit) do - desc "The aclinherit property." + newproperty(:atime) do + desc "The atime property. Values: on | off" end - newproperty(:primarycache) do - desc "The primarycache property." + newproperty(:canmount) do + desc "The canmount property. Values: on | off | noauto" end - newproperty(:secondarycache) do - desc "The secondarycache property." + newproperty(:checksum) do + desc "The checksum property. Values: on | off | fletcher2 | fletcher4 | sha256" end newproperty(:compression) do - desc "The compression property." + desc "The compression property. Values: on | off | lzjb | gzip | gzip-[1-9] | zle" end newproperty(:copies) do - desc "The copies property." + desc "The copies property. Values: 1 | 2 | 3" + end + + newproperty(:devices) do + desc "The devices property. Values: on | off" + end + + newproperty(:exec) do + desc "The exec property. Values: on | off" + end + + newproperty(:logbias) do + desc "The logbias property. Values: latency | throughput" + end + + newproperty(:mountpoint) do + desc "The mountpoint property. Values: <path> | legacy | none" + end + + newproperty(:nbmand) do + desc "The nbmand property. Values: on | off" + end + + newproperty(:primarycache) do + desc "The primarycache property. Values: all | none | metadata" end newproperty(:quota) do - desc "The quota property." + desc "The quota property. Values: <size> | none" + end + + newproperty(:readonly) do + desc "The readonly property. Values: on | off" + end + + newproperty(:recordsize) do + desc "The recordsize property. Values: 512 to 128k, power of 2" + end + + newproperty(:refquota) do + desc "The refquota property. Values: <size> | none" + end + + newproperty(:refreservation) do + desc "The refreservation property. Values: <size> | none" end newproperty(:reservation) do - desc "The reservation property." + desc "The reservation property. Values: <size> | none" + end + + newproperty(:secondarycache) do + desc "The secondarycache property. Values: all | none | metadata" + end + + newproperty(:setuid) do + desc "The setuid property. Values: on | off" + end + + newproperty(:shareiscsi) do + desc "The shareiscsi property. Values: on | off | type=<type>" end newproperty(:sharenfs) do - desc "The sharenfs property." + desc "The sharenfs property. Values: on | off | share(1M) options" + end + + newproperty(:sharesmb) do + desc "The sharesmb property. Values: on | off | sharemgr(1M) options" end newproperty(:snapdir) do - desc "The snapdir property." + desc "The snapdir property. Values: hidden | visible" + end + + newproperty(:version) do + desc "The version property. Values: 1 | 2 | 3 | 4 | current" + end + + newproperty(:volsize) do + desc "The volsize property. Values: <size>" + end + + newproperty(:vscan) do + desc "The vscan property. Values: on | off" + end + + newproperty(:xattr) do + desc "The xattr property. Values: on | off" + end + + newproperty(:zoned) do + desc "The zoned property. Values: on | off" end autorequire(:zpool) do diff --git a/spec/unit/provider/zfs/solaris_spec.rb b/spec/unit/provider/zfs/solaris_spec.rb index 4998ba6fe..84a2be9f6 100755 --- a/spec/unit/provider/zfs/solaris_spec.rb +++ b/spec/unit/provider/zfs/solaris_spec.rb @@ -27,6 +27,7 @@ describe provider_class do describe "when calling add_properties" do it "should add -o and the key=value for each properties with a value" do @resource.stubs(:[]).with(:quota).returns "" + @resource.stubs(:[]).with(:refquota).returns "" @resource.stubs(:[]).with(:mountpoint).returns "/foo" properties = @provider.add_properties properties.include?("-o").should == true |
