summaryrefslogtreecommitdiff
path: root/lib/chef/resource/mount.rb
diff options
context:
space:
mode:
authorMukta A <mukta.aphale@clogeny.com>2013-05-30 15:44:31 +0530
committeradamedx <adamed@opscode.com>2013-06-11 09:37:52 -0700
commit8a8793e702e598dc236fcffb6ea615ba72be421b (patch)
tree4ff69ce1480217cc49eebabfd16ddef3e0871a07 /lib/chef/resource/mount.rb
parente7bc340024b0942113a8096807fcfaabc7ea8521 (diff)
downloadchef-8a8793e702e598dc236fcffb6ea615ba72be421b.tar.gz
Support username, password, domain for mounting windows drives
Diffstat (limited to 'lib/chef/resource/mount.rb')
-rw-r--r--lib/chef/resource/mount.rb31
1 files changed, 29 insertions, 2 deletions
diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb
index 8c32bdd280..7a812556a8 100644
--- a/lib/chef/resource/mount.rb
+++ b/lib/chef/resource/mount.rb
@@ -25,7 +25,7 @@ class Chef
identity_attr :device
- state_attrs :mount_point, :device_type, :fstype
+ state_attrs :mount_point, :device_type, :fstype, :auth_username, :auth_password, :auth_domainname
def initialize(name, run_context=nil)
super
@@ -42,6 +42,9 @@ class Chef
@action = :mount
@supports = { :remount => false }
@allowed_actions.push(:mount, :umount, :remount, :enable, :disable)
+ @auth_username = nil
+ @auth_password = nil
+ @auth_domainname = nil
end
def mount_point(arg=nil)
@@ -131,7 +134,31 @@ class Chef
@supports
end
end
-
+
+ def auth_username(arg=nil)
+ set_or_return(
+ :auth_username,
+ arg,
+ :kind_of => [ String ]
+ )
+ end
+
+ def auth_password(arg=nil)
+ set_or_return(
+ :auth_password,
+ arg,
+ :kind_of => [ String ]
+ )
+ end
+
+ def auth_domainname(arg=nil)
+ set_or_return(
+ :auth_domainname,
+ arg,
+ :kind_of => [ String ]
+ )
+ end
+
end
end
end