Class: Puppet::Application::Describe
- Inherits:
-
Puppet::Application
- Object
- Puppet::Application
- Puppet::Application::Describe
- Defined in:
- lib/puppet/application/describe.rb
Constant Summary
Constants inherited from Puppet::Application
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::POSIX
Util::POSIX::LOCALE_ENV_VARS, Util::POSIX::USER_ENV_VARS
Constants included from Util::SymbolicFileMode
Util::SymbolicFileMode::SetGIDBit, Util::SymbolicFileMode::SetUIDBit, Util::SymbolicFileMode::StickyBit, Util::SymbolicFileMode::SymbolicMode, Util::SymbolicFileMode::SymbolicSpecialToBit
Instance Attribute Summary
Attributes inherited from Puppet::Application
Instance Method Summary collapse
Methods inherited from Puppet::Application
[], #app_defaults, available_application_names, banner, clear!, clear?, clear_everything_for_tests, #configure_indirector_routes, controlled_run, #deprecate, #deprecated?, environment_mode, exit, find, get_environment_mode, #handle_logdest_arg, #handlearg, #initialize, #initialize_app_defaults, interrupted?, #log_runtime_environment, #name, option, option_parser_commands, #parse_options, restart!, restart_requested?, #run, #run_command, run_mode, #set_log_level, #setup_logs, stop!, stop_requested?, try_load_class
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::POSIX
#get_posix_field, #gid, groups_of, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid
Methods included from Util::SymbolicFileMode
#normalize_symbolic_mode, #symbolic_mode_to_int, #valid_symbolic_mode?
Constructor Details
This class inherits a constructor from Puppet::Application
Instance Method Details
#help ⇒ Object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/puppet/application/describe.rb', line 184 def help <<-HELP puppet-describe(8) -- #{summary} ======== SYNOPSIS -------- Prints help about Puppet resource types, providers, and metaparameters. USAGE ----- puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta] OPTIONS ------- * --help: Print this help text * --providers: Describe providers in detail for each type * --list: List all types * --meta: List all metaparameters * --short: List only parameters without detail EXAMPLE ------- $ puppet describe --list $ puppet describe file --providers $ puppet describe user -s -m AUTHOR ------ David Lutterkort COPYRIGHT --------- Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License HELP end |
#main ⇒ Object
241 242 243 244 245 246 247 248 249 |
# File 'lib/puppet/application/describe.rb', line 241 def main doc = TypeDoc.new if [:list] doc.list_types else [:types].each { |name| doc.format_type(name, ) } end end |
#preinit ⇒ Object
237 238 239 |
# File 'lib/puppet/application/describe.rb', line 237 def preinit [:parameters] = true end |
#setup ⇒ Object
251 252 253 254 255 |
# File 'lib/puppet/application/describe.rb', line 251 def setup [:types] = command_line.args.dup handle_help(nil) unless [:list] || [:types].size > 0 $stderr.puts "Warning: ignoring types when listing all types" if [:list] && [:types].size > 0 end |