Class: Puppet::Provider::NameService::PW

Inherits:
ObjectAdd show all
Defined in:
lib/puppet/provider/nameservice/pw.rb

Constant Summary

Constants inherited from Puppet::Provider

Confine

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows, Util::DEFAULT_POSIX_MODE, Util::DEFAULT_WINDOWS_MODE, Util::RFC_3986_URI_REGEX

Constants included from Util::SymbolicFileMode

Util::SymbolicFileMode::SetGIDBit, Util::SymbolicFileMode::SetUIDBit, Util::SymbolicFileMode::StickyBit, Util::SymbolicFileMode::SymbolicMode, Util::SymbolicFileMode::SymbolicSpecialToBit

Constants included from Util::POSIX

Util::POSIX::LOCALE_ENV_VARS, Util::POSIX::USER_ENV_VARS

Constants included from Util::Docs

Util::Docs::HEADER_LEVELS

Instance Attribute Summary

Attributes inherited from Puppet::Provider

#resource

Attributes included from Util::Docs

#doc, #nodoc

Instance Method Summary collapse

Methods inherited from ObjectAdd

#flag, #posixmethod

Methods inherited from Puppet::Provider::NameService

#autogen, autogen_default, autogen_defaults, autogen_id, #comments_insync?, #create, #delete, #ensure, #exists?, #get, #getinfo, #groups, #has_sensitive_data?, #info2hash, #initialize, initvars, instances, listbyname, #munge, option, options, resource_type=, section, #set, #unmunge, validate, verify

Methods inherited from Puppet::Provider

#<=>, #clear, command, #command, commands, declared_feature?, default?, default_match, defaultfor, execfail, #execfail, execpipe, #execpipe, execute, #execute, fact_match, feature_match, #flush, #get, has_command, #initialize, initvars, #inspect, instances, mk_resource_methods, #name, notdefaultfor, optional_commands, post_resource_eval, prefetch, #set, some_default_match, specificity, supports_parameter?, #to_s

Methods included from Util::Logging

#clear_deprecation_warnings, #debug, #deprecation_warning, #format_exception, #get_deprecation_offender, #log_and_raise, #log_deprecations_to_file, #log_exception, #puppet_deprecation_warning, #send_log, setup_facter_logging!, #warn_once

Methods included from Util

absolute_path?, benchmark, chuser, clear_environment, default_env, deterministic_rand, deterministic_rand_int, exit_on_fail, get_env, get_environment, logmethods, merge_environment, path_to_uri, pretty_backtrace, replace_file, safe_posix_fork, set_env, symbolizehash, thinmark, uri_encode, uri_query_encode, uri_to_path, which, withenv, withumask

Methods included from Util::SymbolicFileMode

#normalize_symbolic_mode, #symbolic_mode_to_int, #valid_symbolic_mode?

Methods included from Util::POSIX

#get_posix_field, #gid, groups_of, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid

Methods included from Util::Docs

#desc, #dochook, #doctable, #markdown_definitionlist, #markdown_header, #nodoc?, #pad, scrub

Methods included from Confiner

#confine, #confine_collection, #suitable?

Methods included from Util::Warnings

clear_warnings, debug_once, maybe_log, notice_once, warnonce

Methods included from Util::Errors

#adderrorcontext, #devfail, #error_context, error_location, error_location_with_space, error_location_with_unknowns, #exceptwrap, #fail

Constructor Details

This class inherits a constructor from Puppet::Provider::NameService

Instance Method Details

#deletecmdObject


5
6
7
# File 'lib/puppet/provider/nameservice/pw.rb', line 5

def deletecmd
  [command(:pw), "#{@resource.class.name}del", @resource[:name]]
end

#modifycmd(param, value) ⇒ Object


9
10
11
12
13
14
15
16
17
18
# File 'lib/puppet/provider/nameservice/pw.rb', line 9

def modifycmd(param, value)
  cmd = [
      command(:pw),
      "#{@resource.class.name}mod",
      @resource[:name],
      flag(param),
      munge(param, value)
  ]
  cmd
end