summaryrefslogtreecommitdiffstats
path: root/lib/puppet/face/catalog
diff options
context:
space:
mode:
authornfagerlund <nick.fagerlund@gmail.com>2011-05-18 16:20:05 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-26 16:04:42 -0700
commit331d8128288f8c7bb3645149ff452372c0866429 (patch)
treee1a8982f27a1e273c47d11d29f7f96b9c40e4300 /lib/puppet/face/catalog
parent069a6b8e645255530abf308cfeeed1d7650211db (diff)
downloadpuppet-331d8128288f8c7bb3645149ff452372c0866429.tar.gz
puppet-331d8128288f8c7bb3645149ff452372c0866429.tar.xz
puppet-331d8128288f8c7bb3645149ff452372c0866429.zip
(#7561) Complete help text for all faces and actions
Faces help output relies on input from the documentation methods in each of the faces to be documented. This commit calls those methods in each of our faces, with varying levels of detail depending on their complexity.
Diffstat (limited to 'lib/puppet/face/catalog')
-rw-r--r--lib/puppet/face/catalog/select.rb25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/puppet/face/catalog/select.rb b/lib/puppet/face/catalog/select.rb
index a6c97a627..d86963e75 100644
--- a/lib/puppet/face/catalog/select.rb
+++ b/lib/puppet/face/catalog/select.rb
@@ -2,21 +2,28 @@
Puppet::Face.define(:catalog, '0.0.1') do
action :select do
summary "Select and show a list of resources of a given type"
- description <<-EOT
+ arguments "<host> <resource_type>"
+ returns <<-'EOT'
+ An array of resource objects excised from a catalog. When used at
+ the command line, returns a list of resource references (Type[title]).
+ EOT
+ description <<-'EOT'
Retrieves a catalog for the specified host and returns an array of
- resources of the given type. This action is not intended for
- command-line use.
+ resources of the given type.
EOT
- notes <<-NOTES
- The type name for this action must be given in its capitalized form.
- That is, calling `catalog select mynode file` will return an empty
- array, whereas calling it with 'File' will return a list of the node's
- file resources.
-
+ notes <<-'NOTES'
By default, this action will retrieve a catalog from Puppet's compiler
subsystem; you must call the action with `--terminus rest` if you wish
to retrieve a catalog from the puppet master.
+
+ FORMATTING ISSUES: This action cannot currently render useful yaml;
+ instead, it returns an entire catalog. Use json instead.
NOTES
+ examples <<-'EOT'
+ Ask the puppet master for a list of managed file resources for a node:
+
+ $ puppet catalog select --terminus rest somenode.magpie.lan file
+ EOT
when_invoked do |host, type, options|
# REVISIT: Eventually, type should have a default value that triggers
# the non-specific behaviour. For now, though, this will do.