From 18505a0ce1246c9b498f5b163fc4f5c588910818 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Fri, 2 May 2014 10:23:03 +0100 Subject: [PATCH 01/42] Added aliases for puppet. --- plugins/puppet/puppet.plugin.zsh | 1 + 1 file changed, 1 insertion(+) create mode 100644 plugins/puppet/puppet.plugin.zsh diff --git a/plugins/puppet/puppet.plugin.zsh b/plugins/puppet/puppet.plugin.zsh new file mode 100644 index 000000000..79a35b3e9 --- /dev/null +++ b/plugins/puppet/puppet.plugin.zsh @@ -0,0 +1 @@ +alias pa='puppet apply' From a960973c50134286ffac5832151d0f9675382c3f Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:11:10 +0100 Subject: [PATCH 02/42] Move puppet plugin into custom area: Since puppet is a new plugin, it seems best if it resides under the custom area. --- {plugins => custom/plugins}/puppet/puppet.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {plugins => custom/plugins}/puppet/puppet.plugin.zsh (100%) diff --git a/plugins/puppet/puppet.plugin.zsh b/custom/plugins/puppet/puppet.plugin.zsh similarity index 100% rename from plugins/puppet/puppet.plugin.zsh rename to custom/plugins/puppet/puppet.plugin.zsh From d76d799aa241fa172353abc5d60858c75595867c Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:17:35 +0100 Subject: [PATCH 03/42] Add Puppet agent auto-completion: The plugin provides auto-completion to the top-level commands of puppet. It also provides auto-completion for the agent sub-command. --- custom/plugins/puppet/_puppet | 136 ++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 custom/plugins/puppet/_puppet diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet new file mode 100644 index 000000000..61994c1df --- /dev/null +++ b/custom/plugins/puppet/_puppet @@ -0,0 +1,136 @@ +#compdef puppet +#autoload + +#set -x + +# puppet zsh completion + +local -a _1st_arguments +_1st_arguments=( + 'agent:The puppet agent daemon' + 'apply:Apply Puppet manifests locally' + 'ca:Local Puppet Certificate Authority management.' + 'catalog:Compile, save, view, and convert catalogs' + 'cert:Manage certificates and requests' + 'certificate:Provide access to the CA for certificate management' + 'certificate_request:Manage certificate requests' + 'certificate_revocation_list:Manage the list of revoked certificates' + 'config:Interact with Puppet settings' + 'describe:Display help about resource types' + 'device:Manage remote network devices' + 'doc:Generate Puppet documentation and references' + 'facts:Retrieve and store facts' + 'file:Retrieve and store files in a filebucket' + 'filebucket:Store and retrieve files in a filebucket' + 'help:Display Puppet help' + 'inspect:Send an inspection report' + 'instrumentation_data:Manage instrumentation listener accumulated data' + 'instrumentation_listener:Manage instrumentation listeners' + 'instrumentation_probe:Manage instrumentation probes' + 'key:Create, save, and remove certificate keys' + 'kick:Remotely control puppet agent' + 'man:Display Puppet manual pages' + 'master:The puppet master daemon' + 'module:Creates, installs and searches for modules on the Puppet Forge' + 'node:View and manage node definitions' + 'parser:Interact directly with the parser' + 'plugin:Interact with the Puppet plugin system' + 'queue:Deprecated queuing daemon for asynchronous storeconfigs' + 'report:Create, display, and submit reports' + 'resource:The resource abstraction layer shell' + 'resource_type:View classes, defined resource types, and nodes from all manifests' + 'secret_agent:Mimics puppet agent' + 'status:View puppet server status' +) + +local -a _agent_arguments +_agent_arguments=( + '--certname: Set the certname of the client' + '-D:Send process to background (daemonize)' + '--daemonize:Send process to background (daemonize)' + '--no-daemonize:Do not send process to background' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '--detailed-exitcodes:Provide transaction information via exit codes' + '--digest: Change the certificate fingerprinting digest algorithm' + '--disable: Disable working on the local system' + '--enable:Enable working on the local system' + '--fingerprint:Display the current certificate or certificate signing request fingerprint and then exit' + '-h:Print this help message' + '--help:Print this help message' + '-l:syslog||console Where to send messages' + '--logdest:syslog||console Where to send messages' + '--no-client:Do not create a config client' + '--masterport:The port on which to contact the puppet master' + '--noop:Use "noop" mode where the daemon runs in a no-op or dry-run mode' + '-o:Run the configuration once' + '--onetime:Run the configuration once' + '-t:Enable the most common options used for testing' + '--test:Enable the most common options used for testing' + '-v:Turn on verbose reporting' + '--verbose:Turn on verbose reporting' + '-V:Print the puppet version number and exit' + '--version:Print the puppet version number and exit' + '-w:This option only matters for daemons that do not yet have certificates' + '--waitforcert: This option only matters for daemons that do not yet have certificates' +) + +__task_list () +{ + local expl + declare -a tasks + + tasks=(agent apply ca catalog cert certificate certificate_revocation_list config describe device doc facts file filebucket help inspect instrumentation_data instrumentation_listener instrumentation_probe key kick man master module node parser plugin queue report resource resource_type secret_agent status) + + _wanted tasks expl 'help' compadd $tasks +} + +__puppet-agent () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _agent_arguments + return + ;; + esac +} + + + +local expl +#local -a boxes installed_boxes + +local curcontext="$curcontext" state line +typeset -A opt_args + +_arguments -C \ + ':command:->command' \ + '*::options:->options' + +case $state in + (command) + _describe -t commands "gem subcommand" _1st_arguments + return + ;; + + (options) + case $line[1] in + # Auto-complete help for top-level command sub-commands e.g. puppet help agent, puppet help apply. + (help) + _arguments ':feature:__task_list' + ;; + + # Display sub-commands for puppet agent. + (agent) + __puppet-agent + ;; + esac + ;; +esac From cbddb896995e585c3fef90b91f06a8aa18b974b2 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:23:37 +0100 Subject: [PATCH 04/42] Add auto-completion for puppet apply: Provides auto-complete options for puppet apply sub-command. --- custom/plugins/puppet/_puppet | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 61994c1df..5dea58210 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -75,6 +75,24 @@ _agent_arguments=( '--waitforcert: This option only matters for daemons that do not yet have certificates' ) +local -a _apply_arguments +_apply_arguments=( + '-h:Print this help message' + '--help:Print this help message' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '-v:Print extra information' + '--verbose:Print extra information' + '-e:Execute a specific piece of Puppet code' + '--execute:Execute a specific piece of Puppet code' + '--detailed-exitcodes:' + '-l:Where to send messages' + '--logdest: Where to send messages' + '--noop:Use "noop" mode where Puppet runs in a no-op or dry-run mode' + '--catalog:: Apply a JSON catalog (such as one generated with "puppet master --compile)"' + '--write-catalog-summary: After compiling the catalog saves the resource list and classes list' +) + __task_list () { local expl @@ -102,6 +120,23 @@ __puppet-agent () esac } +__puppet-apply () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _apply_arguments + return + ;; + esac +} + local expl @@ -131,6 +166,11 @@ case $state in (agent) __puppet-agent ;; + + # Display sub-commands for puppet apply. + (apply) + __puppet-apply + ;; esac ;; esac From 5794fcd28ae5e672da461a62c340e660e890beb1 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:25:17 +0100 Subject: [PATCH 05/42] Add auto-completion for puppet ca: Provides auto-complete options for puppet ca sub-command. --- custom/plugins/puppet/_puppet | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 5dea58210..9a8397524 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -93,6 +93,18 @@ _apply_arguments=( '--write-catalog-summary: After compiling the catalog saves the resource list and classes list' ) +local -a _ca_arguments +_ca_arguments=( + 'destroy:undocumented action' + 'fingerprint:undocumented action' + 'generate:undocumented action' + 'list:List certificates and/or certificate requests' + 'print:undocumented action' + 'revoke:undocumented action' + 'sign:undocumented action' + 'verify:undocumented action' +) + __task_list () { local expl @@ -137,6 +149,23 @@ __puppet-apply () esac } +__puppet-ca () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _ca_arguments + return + ;; + esac +} + local expl @@ -171,6 +200,11 @@ case $state in (apply) __puppet-apply ;; + + # Display sub-commands for puppet ca. + (ca) + __puppet-ca + ;; esac ;; esac From d306e2fc27d2b5917fde85594f898c08cc378e7d Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:26:44 +0100 Subject: [PATCH 06/42] Add auto-completion for puppet catalog: Provides auto-complete options for puppet catalog sub-command. --- custom/plugins/puppet/_puppet | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9a8397524..7dc2349ef 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -105,6 +105,19 @@ _ca_arguments=( 'verify:undocumented action' ) +local -a _catalog_arguments +_catalog_arguments=( + 'apply:Find and apply a catalog' + "download:Download this node's catalog from the puppet master server" + 'find:Retrieve the catalog for a node' + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + 'select:Retrieve a catalog and filter it for resources of a given type' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () { local expl @@ -166,6 +179,23 @@ __puppet-ca () esac } +__puppet-catalog () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _catalog_arguments + return + ;; + esac +} + local expl @@ -205,6 +235,11 @@ case $state in (ca) __puppet-ca ;; + + # Display sub-commands for puppet catalog. + (catalog) + __puppet-catalog + ;; esac ;; esac From 911310f2c2762ab9fa50e26db36feba08ef430c6 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:28:10 +0100 Subject: [PATCH 07/42] Add auto-completion for puppet cert: Provides auto-complete options for puppet cert sub-command. --- custom/plugins/puppet/_puppet | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 7dc2349ef..630931d7a 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -118,6 +118,19 @@ _catalog_arguments=( '--debug:Whether to log debug information' ) +local -a _cert_arguments +_cert_arguments=( + "clean:'Revoke a host's certificate (if applicable) and remove all files related to that host from puppet cert's storage" + 'fingerprint:Print the DIGEST (defaults to the signing algorithm) fingerprint of a host's certificate' + 'generate:Generate a certificate for a named client' + 'list:List outstanding certificate requests' + "print:Print the full-text version of a host's certificate." + 'revoke:Revoke the certificate of a client' + 'sign:Sign an outstanding certificate request' + 'verify:Verify the named certificate against the local CA certificate' + 'reinventory:Build an inventory of the issued certificates' +) + __task_list () { local expl @@ -196,6 +209,23 @@ __puppet-catalog () esac } +__puppet-cert () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _cert_arguments + return + ;; + esac +} + local expl @@ -240,6 +270,11 @@ case $state in (catalog) __puppet-catalog ;; + + # Display sub-commands for puppet cert. + (cert) + __puppet-cert + ;; esac ;; esac From 06c31ac969a9239b09b50c7992fc18dccfa41824 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Sun, 4 May 2014 23:38:06 +0100 Subject: [PATCH 08/42] Add commonly used aliases: * Renamed alias to allow the more common usage to use the shorter form alias. * Added alias to get catalog from master. * Added alias to test getting catalog from master without actually doing it. --- custom/plugins/puppet/puppet.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom/plugins/puppet/puppet.plugin.zsh b/custom/plugins/puppet/puppet.plugin.zsh index 79a35b3e9..e485eddbd 100644 --- a/custom/plugins/puppet/puppet.plugin.zsh +++ b/custom/plugins/puppet/puppet.plugin.zsh @@ -1 +1,5 @@ -alias pa='puppet apply' +alias pa='puppet agent' +alias pat='puppet agent -t' +alias patnp='puppet agent -t --noop' + +alias pap='puppet apply' From 73d3a70ea065cc15fa18fbe69f8122dd1dd54a15 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 17:53:26 +0100 Subject: [PATCH 09/42] Fix bug in cert arguments: * clean option had an extra single quote. * fingerprint option had a single quote as part of the text so changed outer quotes to double quotes. --- custom/plugins/puppet/_puppet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 630931d7a..7d4ec6f00 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -120,8 +120,8 @@ _catalog_arguments=( local -a _cert_arguments _cert_arguments=( - "clean:'Revoke a host's certificate (if applicable) and remove all files related to that host from puppet cert's storage" - 'fingerprint:Print the DIGEST (defaults to the signing algorithm) fingerprint of a host's certificate' + "clean:Revoke a host's certificate (if applicable) and remove all files related to that host from puppet cert's storage" + "fingerprint:Print the DIGEST (defaults to the signing algorithm) fingerprint of a host's certificate" 'generate:Generate a certificate for a named client' 'list:List outstanding certificate requests' "print:Print the full-text version of a host's certificate." From 9080167f45764e89a42b7c83e4678b89c01371a2 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 17:54:46 +0100 Subject: [PATCH 10/42] Add auto-completion for puppet certificate: Provides auto-complete options for puppet certificate sub-command. --- custom/plugins/puppet/_puppet | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 7d4ec6f00..751a7fa11 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -131,6 +131,16 @@ _cert_arguments=( 'reinventory:Build an inventory of the issued certificates' ) +local -a _certificate_arguments +_certificate_arguments=( + 'destroy:Delete a certificate' + 'find:Retrieve a certificate' + 'generate:Generate a new certificate signing request' + 'info:Print the default terminus class for this face' + 'list:List all certificate signing requests' + 'sign:Sign a certificate signing request for HOST' +) + __task_list () { local expl @@ -226,6 +236,23 @@ __puppet-cert () esac } +__puppet-certificate () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _certificate_arguments + return + ;; + esac +} + local expl @@ -275,6 +302,11 @@ case $state in (cert) __puppet-cert ;; + + # Display sub-commands for puppet certificate. + (certificate) + __puppet-certificate + ;; esac ;; esac From 996caceffbd7d87dbd4ff5945458b696d694ca9b Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:06:10 +0100 Subject: [PATCH 11/42] Add missing catalog options. --- custom/plugins/puppet/_puppet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 751a7fa11..d012b457d 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -116,6 +116,8 @@ _catalog_arguments=( '--render-as:FORMAT The rendering format to use' '--verbose:Whether to log verbosely' '--debug:Whether to log debug information' + '--extra HASH:Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' ) local -a _cert_arguments From 2371d5978ad52f1b449278761eb568de252e6ec4 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:06:26 +0100 Subject: [PATCH 12/42] Add missing cert options. --- custom/plugins/puppet/_puppet | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index d012b457d..0f310ea10 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -131,6 +131,13 @@ _cert_arguments=( 'sign:Sign an outstanding certificate request' 'verify:Verify the named certificate against the local CA certificate' 'reinventory:Build an inventory of the issued certificates' + '-h:Print this help message' + '--help:Print this help message' + '-V:Print the puppet version number and exit' + '--version:Print the puppet version number and exit' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--digest:Set the digest for fingerprinting' ) local -a _certificate_arguments From 73d10f5ba447033ba8dee2adfacd2949f1200c16 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:14:27 +0100 Subject: [PATCH 13/42] Add more certificate options. --- custom/plugins/puppet/_puppet | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 0f310ea10..8f0c7e07d 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -148,6 +148,21 @@ _certificate_arguments=( 'info:Print the default terminus class for this face' 'list:List all certificate signing requests' 'sign:Sign a certificate signing request for HOST' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--ca-location: LOCATION Which certificate authority to use (local or remote)' + '--extra HASH:Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + +local -a _certificate_revocation_list_arguments +_certificate_revocation_list_arguments=( + destroy Delete the certificate revocation list. + find Retrieve the certificate revocation list. + info Print the default terminus class for this face. + save Invalid for this subcommand. + search Invalid for this subcommand. ) __task_list () From 31adfa1f55d9a341654ef3986acaa965f8c412e3 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:15:13 +0100 Subject: [PATCH 14/42] Add auto-completion for puppet certificate_revocation_list: Provides auto-complete options for puppet certificate-revocation_list sub-command. --- custom/plugins/puppet/_puppet | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 8f0c7e07d..0cc1fa6d1 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -163,6 +163,11 @@ _certificate_revocation_list_arguments=( info Print the default terminus class for this face. save Invalid for this subcommand. search Invalid for this subcommand. + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra HASH:Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' ) __task_list () @@ -277,6 +282,23 @@ __puppet-certificate () esac } +__puppet-certificate_revocation_list () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _certificate_revocation_list_arguments + return + ;; + esac +} + local expl @@ -331,6 +353,11 @@ case $state in (certificate) __puppet-certificate ;; + + # Display sub-commands for puppet certificate_revocation_list. + (certificate) + __puppet-certificate_revocation_list + ;; esac ;; esac From 06ba11272c03d94b76d64a30c39167c5238c61ee Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:21:51 +0100 Subject: [PATCH 15/42] Fix certificate options. --- custom/plugins/puppet/_puppet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 0cc1fa6d1..18c7bac79 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -152,7 +152,7 @@ _certificate_arguments=( '--verbose:Whether to log verbosely' '--debug:Whether to log debug information' '--ca-location: LOCATION Which certificate authority to use (local or remote)' - '--extra HASH:Extra arguments to pass to the indirection request' + '--extra:HASH Extra arguments to pass to the indirection request' '--terminus: TERMINUS The indirector terminus to use' ) From b85cbcc753c4c8497047389b72b47453eec3e360 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:22:15 +0100 Subject: [PATCH 16/42] Fix certificate_revocation_list options. --- custom/plugins/puppet/_puppet | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 18c7bac79..b34506dcd 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -158,15 +158,15 @@ _certificate_arguments=( local -a _certificate_revocation_list_arguments _certificate_revocation_list_arguments=( - destroy Delete the certificate revocation list. - find Retrieve the certificate revocation list. - info Print the default terminus class for this face. - save Invalid for this subcommand. - search Invalid for this subcommand. + 'destroy:Delete the certificate revocation list' + 'find:Retrieve the certificate revocation list' + 'info:Print the default terminus class for this face' + 'save:Invalid for this subcommand' + 'search:Invalid for this subcommand' '--render-as:FORMAT The rendering format to use' '--verbose:Whether to log verbosely' '--debug:Whether to log debug information' - '--extra HASH:Extra arguments to pass to the indirection request' + '--extra:HASH Extra arguments to pass to the indirection request' '--terminus: TERMINUS The indirector terminus to use' ) @@ -355,7 +355,7 @@ case $state in ;; # Display sub-commands for puppet certificate_revocation_list. - (certificate) + (certificate_revocation_list) __puppet-certificate_revocation_list ;; esac From eaae32d0c30840ef720059353c39145c2dcfdb5c Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:23:45 +0100 Subject: [PATCH 17/42] Add auto-completion for puppet config: Provides auto-complete options for puppet config sub-command. --- custom/plugins/puppet/_puppet | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index b34506dcd..7cde17e9f 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -170,6 +170,16 @@ _certificate_revocation_list_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _config_arguments +_config_arguments=( + "print:Examine Puppet's current settings" + "set:Set Puppet's settings" + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--section:SECTION_NAME The section of the configuration file to interact with' +) + __task_list () { local expl @@ -299,6 +309,23 @@ __puppet-certificate_revocation_list () esac } +__puppet-config () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _config_arguments + return + ;; + esac +} + local expl @@ -358,6 +385,11 @@ case $state in (certificate_revocation_list) __puppet-certificate_revocation_list ;; + + # Display sub-commands for puppet config. + (config) + __puppet-config + ;; esac ;; esac From 0b0593a22d975c8ee9acc9996983e6cc865e5438 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:37:12 +0100 Subject: [PATCH 18/42] Add auto-completion for puppet describe: Provides auto-complete options for puppet describe sub-command. --- custom/plugins/puppet/_puppet | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 7cde17e9f..610ff35a6 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -180,6 +180,15 @@ _config_arguments=( '--section:SECTION_NAME The section of the configuration file to interact with' ) +local -a _describe_arguments +_describe_arguments=( + '--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' +) + __task_list () { local expl @@ -326,6 +335,23 @@ __puppet-config () esac } +__puppet-describe () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _describe_arguments + return + ;; + esac +} + local expl @@ -390,6 +416,11 @@ case $state in (config) __puppet-config ;; + + # Display sub-commands for puppet describe. + (describe) + __puppet-describe + ;; esac ;; esac From 7a066b661f37ce87d2180449c48a3ca6bd4a27d1 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:46:26 +0100 Subject: [PATCH 19/42] Add auto-completion for puppet device: Provides auto-complete options for puppet device sub-command. --- custom/plugins/puppet/_puppet | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 610ff35a6..fdd3f98ab 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -189,6 +189,23 @@ _describe_arguments=( '--short:List only parameters without detail' ) +local -a _device_arguments +_device_arguments=( + '-d:Enable full debugging' + '--debug:Enable full debugging' + '--detailed-exitcodes:Provide transaction information via exit codes' + '-V:Print the puppet version number and exit' + '--version:Print the puppet version number and exit' + '-h:Print this help message' + '--help:Print this help message' + '-l:Where to send messages' + '--logdest: syslog||console Where to send messages' + '-v:Turn on verbose reporting' + '--verbose:Turn on verbose reporting' + '-w: This option only matters for daemons that do not yet have certificates' + '--waitforcert: This option only matters for daemons that do not yet have certificates' +) + __task_list () { local expl @@ -352,6 +369,23 @@ __puppet-describe () esac } +__puppet-device () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _device_arguments + return + ;; + esac +} + local expl @@ -421,6 +455,11 @@ case $state in (describe) __puppet-describe ;; + + # Display sub-commands for puppet device. + (device) + __puppet-device + ;; esac ;; esac From 4af57081735ae63455d0a5e022f1481889b82f8e Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 19:54:59 +0100 Subject: [PATCH 20/42] Add auto-completion for puppet doc: Provides auto-complete options for puppet doc sub-command. --- custom/plugins/puppet/_puppet | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index fdd3f98ab..7f4741392 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -206,6 +206,21 @@ _device_arguments=( '--waitforcert: This option only matters for daemons that do not yet have certificates' ) +local -a _doc_arguments +_doc_arguments=( + '-a:Output the docs for all of the reference types' + '--all:Output the docs for all of the reference types' + '-h:Print this help message' + '--help:Print this help message' + "-o: Used only in 'rdoc' mode" + "--outputdir: Used only in 'rdoc' mode" + '-m:text|pdf|rdoc Determine the output mode' + '--mode:text|pdf|rdoc Determine the output mode' + '-r: Build a particular reference' + '--reference: Build a particular reference' + "--charset: Used only in 'rdoc' mode" +) + __task_list () { local expl @@ -386,6 +401,23 @@ __puppet-device () esac } +__puppet-doc () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _doc_arguments + return + ;; + esac +} + local expl @@ -460,6 +492,11 @@ case $state in (device) __puppet-device ;; + + # Display sub-commands for puppet doc. + (doc) + __puppet-doc + ;; esac ;; esac From 48240a1dee4ad79c8c1faba2e0722012bce168a5 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 20:07:24 +0100 Subject: [PATCH 21/42] Add auto-completion for puppet facts: Provides auto-complete options for puppet facts sub-command. --- custom/plugins/puppet/_puppet | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 7f4741392..9a7189883 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -221,6 +221,18 @@ _doc_arguments=( "--charset: Used only in 'rdoc' mode" ) +local -a _facts_arguments +_facts_arguments=( + "find:Retrieve a node's facts" + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () { local expl @@ -418,6 +430,23 @@ __puppet-doc () esac } +__puppet-facts () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _facts_arguments + return + ;; + esac +} + local expl @@ -497,6 +526,11 @@ case $state in (doc) __puppet-doc ;; + + # Display sub-commands for puppet facts. + (facts) + __puppet-facts + ;; esac ;; esac From d0095421ac0fdb26e257600dceb81f0ae9a549a6 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 20:11:25 +0100 Subject: [PATCH 22/42] Add auto-completion for puppet file: Provides auto-complete options for puppet file sub-command. --- custom/plugins/puppet/_puppet | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9a7189883..7a37e978d 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -233,6 +233,21 @@ _facts_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _file_arguments +_file_arguments=( + 'download:Download a file into the local filebucket' + 'find:Retrieve a file from the filebucket' + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + 'store:Store a file in the local filebucket' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + + __task_list () { local expl @@ -447,6 +462,23 @@ __puppet-facts () esac } +__puppet-file () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _file_arguments + return + ;; + esac +} + local expl @@ -531,6 +563,11 @@ case $state in (facts) __puppet-facts ;; + + # Display sub-commands for puppet file. + (file) + __puppet-file + ;; esac ;; esac From b7fddb6c28ae321dcafcd4d5611cce6e0e61a38e Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 20:20:29 +0100 Subject: [PATCH 23/42] Add auto-completion for puppet filebucket: Provides auto-complete options for puppet filebucket sub-command. --- custom/plugins/puppet/_puppet | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 7a37e978d..fc283875d 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -247,6 +247,26 @@ _file_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _filebucket_arguments +_filebucket_arguments=( + '-h:Print this help message' + '--help:Print this help message' + '-V:Print version information' + '--version:Print version information' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '-v:Print extra information' + '--verbose:Print extra information' + '-l:Use the local filebucket' + '--local:Use the local filebucket' + '-r:Use a remote filebucket' + '--remote:Use a remote filebucket' + '-s: The server to send the file to, instead of locally' + '-server: The server to send the file to, instead of locally' + '-b: undocumented action' + '--bucket: undocumented action' +) + __task_list () { @@ -479,6 +499,23 @@ __puppet-file () esac } +__puppet-filebucket () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _filebucket_arguments + return + ;; + esac +} + local expl @@ -568,6 +605,11 @@ case $state in (file) __puppet-file ;; + + # Display sub-commands for puppet file. + (filebucket) + __puppet-filebucket + ;; esac ;; esac From e10b808c437740885440c87c043f4f1f83b52fde Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:16:10 +0100 Subject: [PATCH 24/42] Add auto-completion for puppet inspect: Provides auto-complete options for puppet inspect sub-command. --- custom/plugins/puppet/_puppet | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index fc283875d..209e0f85b 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -267,6 +267,12 @@ _filebucket_arguments=( '--bucket: undocumented action' ) +local -a _inspect_arguments +_inspect_arguments=( + '--archive_files:During an inspect run, whether to archive files whose contents are audited to a file bucket' + '--archive_file_server:During an inspect run, the file bucket server to archive files to if archive_files is set' +) + __task_list () { @@ -516,6 +522,23 @@ __puppet-filebucket () esac } +__puppet-inspect () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _inspect_arguments + return + ;; + esac +} + local expl @@ -606,10 +629,15 @@ case $state in __puppet-file ;; - # Display sub-commands for puppet file. + # Display sub-commands for puppet filebucket. (filebucket) __puppet-filebucket ;; + + # Display sub-commands for puppet inspect. + (inspect) + __puppet-inspect + ;; esac ;; esac From 9d212abf3b3e3b11f8a68e2e0c8522100c4abca0 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:17:11 +0100 Subject: [PATCH 25/42] Add auto-completion for puppet instrumentation_data: Provides auto-complete options for puppet instrumentation_data sub-command. --- custom/plugins/puppet/_puppet | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 209e0f85b..3219c3718 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -273,6 +273,17 @@ _inspect_arguments=( '--archive_file_server:During an inspect run, the file bucket server to archive files to if archive_files is set' ) +local -a _instrumentation_data_arguments +_instrumentation_data_arguments=( + 'find:Retrieve listener data' + 'info:Print the default terminus class for this face' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () { @@ -539,6 +550,23 @@ __puppet-inspect () esac } +__puppet-instrumentation_data () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _instrumentation_data_arguments + return + ;; + esac +} + local expl @@ -638,6 +666,11 @@ case $state in (inspect) __puppet-inspect ;; + + # Display sub-commands for puppet instrumentation_data. + (instrumentation_data) + __puppet-instrumentation_data + ;; esac ;; esac From bf3555088bc3e0818dfd4497ce634f34d045069f Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:25:19 +0100 Subject: [PATCH 26/42] Add auto-completion for puppet instrumentation_listener: Provides auto-complete options for puppet instrumentation_listener sub-command. --- custom/plugins/puppet/_puppet | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 3219c3718..400b30a15 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -284,6 +284,21 @@ _instrumentation_data_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _instrumentation_listener_arguments +_instrumentation_listener_arguments=( + 'disable:Disable a given instrumentation listener' + 'enable:Enable a given instrumentation listener' + 'find:Retrieve a single listener' + 'info:Print the default terminus class for this face' + 'save:API only: modify an instrumentation listener status' + 'search:Retrieve all instrumentation listeners statuses' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () { @@ -567,6 +582,23 @@ __puppet-instrumentation_data () esac } +__puppet-instrumentation_listener () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _instrumentation_listener_arguments + return + ;; + esac +} + local expl @@ -671,6 +703,11 @@ case $state in (instrumentation_data) __puppet-instrumentation_data ;; + + # Display sub-commands for puppet instrumentation_listener. + (instrumentation_listener) + __puppet-instrumentation_listener + ;; esac ;; esac From 6b8ae5e16c9249589ef6cf0aa9edac016b99d3c7 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:26:20 +0100 Subject: [PATCH 27/42] Add auto-completion for puppet instrumentation_probe: Provides auto-complete options for puppet instrumentation_probe sub-command. --- custom/plugins/puppet/_puppet | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 400b30a15..6d9cc162f 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -299,6 +299,21 @@ _instrumentation_listener_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _instrumentation_probe_arguments +_instrumentation_probe_arguments=( + 'destroy:API only: disable all instrumentation probes' + 'disable:Disable all instrumentation probes' + 'enable:Enable all instrumentation probes' + 'info:Print the default terminus class for this face' + 'save:API only: enable all instrumentation probes' + 'search:Retrieve all probe statuses' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () { @@ -599,6 +614,23 @@ __puppet-instrumentation_listener () esac } +__puppet-instrumentation_probe () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _instrumentation_probe_arguments + return + ;; + esac +} + local expl @@ -708,6 +740,11 @@ case $state in (instrumentation_listener) __puppet-instrumentation_listener ;; + + # Display sub-commands for puppet instrumentation_probe. + (instrumentation_probe) + __puppet-instrumentation_probe + ;; esac ;; esac From 523554e691a44e361c99b1458764cc4ef920fda4 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:30:55 +0100 Subject: [PATCH 28/42] Add auto-completion for puppet key: Provides auto-complete options for puppet key sub-command. --- custom/plugins/puppet/_puppet | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 6d9cc162f..44718ef47 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -314,6 +314,20 @@ _instrumentation_probe_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _key_arguments +_key_arguments=( + 'destroy:Delete an object' + 'find:Retrieve an object by name' + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + 'search:Search for an object or retrieve multiple objects' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () { @@ -631,6 +645,23 @@ __puppet-instrumentation_probe () esac } +__puppet-key () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _key_arguments + return + ;; + esac +} + local expl @@ -745,6 +776,11 @@ case $state in (instrumentation_probe) __puppet-instrumentation_probe ;; + + # Display sub-commands for puppet key. + (key) + __puppet-key + ;; esac ;; esac From 57aff237c23290037dfb4a08a02d3a5735756cdd Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:42:04 +0100 Subject: [PATCH 29/42] Add auto-completion for puppet kick: Provides auto-complete options for puppet kick sub-command. --- custom/plugins/puppet/_puppet | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 44718ef47..954d95c7a 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -328,6 +328,28 @@ _key_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _kick_arguments +_kick_arguments=( + '-a:Connect to all available hosts. Requires LDAP support at this point' + '--all:Connect to all available hosts. Requires LDAP support at this point' + '-c: Specify a class of machines to which to connect. This only works if you have LDAP configured, at the moment' + '--class: Specify a class of machines to which to connect. This only works if you have LDAP configured, at the moment' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '-f:Run each configuration in the foreground' + '--foreground:Run each configuration in the foreground' + '-h:Print this help message' + '--help:Print this help message' + '--host: A specific host to which to connect' + '--no-fqdn:undocumented action' + '--ignoreschedules:Whether the client should ignore schedules when running its configuration' + '-t: Specify a tag for selecting the objects to apply' + '--tag: Specify a tag for selecting the objects to apply' + '--test:Print the hosts you would connect to but do not actually connect' + '-p:Do an ICMP echo against the target host' + '--ping:Do an ICMP echo against the target host' +) + __task_list () { @@ -662,6 +684,23 @@ __puppet-key () esac } +__puppet-kick () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _kick_arguments + return + ;; + esac +} + local expl @@ -781,6 +820,11 @@ case $state in (key) __puppet-key ;; + + # Display sub-commands for puppet kick. + (kick) + __puppet-kick + ;; esac ;; esac From 41838d0aaf9bbb9c7e38e1b353e51ae8a1a19f7b Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:45:53 +0100 Subject: [PATCH 30/42] Add auto-completion for puppet man: Provides auto-complete options for puppet man sub-command. --- custom/plugins/puppet/_puppet | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 954d95c7a..81583610b 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -350,6 +350,14 @@ _kick_arguments=( '--ping:Do an ICMP echo against the target host' ) +local -a _man_arguments +_man_arguments=( + 'man:Display the manual page for a Puppet subcommand' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () { @@ -701,6 +709,23 @@ __puppet-kick () esac } +__puppet-man () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _man_arguments + return + ;; + esac +} + local expl @@ -825,6 +850,11 @@ case $state in (kick) __puppet-kick ;; + + # Display sub-commands for puppet man. + (man) + __puppet-man + ;; esac ;; esac From 50afe1d2a417ed0f52edc4ba35664db2a2fd8ff9 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 21:57:49 +0100 Subject: [PATCH 31/42] Add auto-completion for puppet master: Provides auto-complete options for puppet master sub-command. --- custom/plugins/puppet/_puppet | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 81583610b..0e5a011cf 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -358,6 +358,25 @@ _man_arguments=( '--debug:Whether to log debug information' ) +local -a _master_arguments +_master_arguments=( + '-D:Send the process into the background' + '--daemonize:Send the process into the background' + '--no-daemonize:Do not send the process into the background' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '-h:Print this help message' + '--help:Print this help message' + '-l:|console|syslog Where to send messages' + '--logdest:|console|syslog Where to send messages' + '-v:Enable verbosity' + '--verbose:Enable verbosity' + '-V:Print the puppet version number and exit' + '--version:Print the puppet version number and exit' + '--compile: Compile a catalogue and output it in JSON from the puppet master' +) + + __task_list () { @@ -726,6 +745,23 @@ __puppet-man () esac } +__puppet-master () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _master_arguments + return + ;; + esac +} + local expl @@ -855,6 +891,11 @@ case $state in (man) __puppet-man ;; + + # Display sub-commands for puppet master. + (master) + __puppet-master + ;; esac ;; esac From cc4294dd45e29016db8153efb4cc6cbdff6a1ad9 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:07:16 +0100 Subject: [PATCH 32/42] Add auto-completion for puppet module: Provides auto-complete options for puppet module sub-command. --- custom/plugins/puppet/_puppet | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 0e5a011cf..ff0e2da58 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -376,6 +376,22 @@ _master_arguments=( '--compile: Compile a catalogue and output it in JSON from the puppet master' ) +local -a _module_arguments +_module_arguments=( + 'build:Build a module release package' + 'changes:Show modified files of an installed module' + 'generate:Generate boilerplate for a new module' + 'install:Install a module from the Puppet Forge or a release archive' + 'list:List installed modules' + 'search:Search the Puppet Forge for a module' + 'uninstall:Uninstall a puppet module' + 'upgrade:Upgrade a puppet module' + '-verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--environment: production The environment Puppet is running in' + '--modulepath:$basemodulepath The search path for modules' +) + __task_list () @@ -762,6 +778,23 @@ __puppet-master () esac } +__puppet-module () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _module_arguments + return + ;; + esac +} + local expl @@ -896,6 +929,11 @@ case $state in (master) __puppet-master ;; + + # Display sub-commands for puppet module. + (module) + __puppet-module + ;; esac ;; esac From 5b354cf28087cd8946ee9792ca8904f77be504bb Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:09:25 +0100 Subject: [PATCH 33/42] Add auto-completion for puppet node: Provides auto-complete options for puppet node sub-command. --- custom/plugins/puppet/_puppet | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index ff0e2da58..c96cd2243 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -392,6 +392,18 @@ _module_arguments=( '--modulepath:$basemodulepath The search path for modules' ) +local -a _node_arguments +_node_arguments=( + 'clean:Clean up everything a puppetmaster knows about a node' + 'find:Retrieve a node object' + 'info:Print the default terminus class for this face' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () @@ -795,6 +807,23 @@ __puppet-module () esac } +__puppet-node () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _node_arguments + return + ;; + esac +} + local expl @@ -934,6 +963,11 @@ case $state in (module) __puppet-module ;; + + # Display sub-commands for puppet node. + (node) + __puppet-node + ;; esac ;; esac From f51f858bb3d84c9ea293ee4525fd6004be21b5ef Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:14:42 +0100 Subject: [PATCH 34/42] Add auto-completion for puppet parser: Provides auto-complete options for puppet parser sub-command. --- custom/plugins/puppet/_puppet | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index c96cd2243..9ba17db16 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -404,6 +404,14 @@ _node_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _parser_arguments +_parser_arguments=( + 'validate:Validate the syntax of one or more Puppet manifests' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () @@ -824,6 +832,23 @@ __puppet-node () esac } +__puppet-parser () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _parser_arguments + return + ;; + esac +} + local expl @@ -968,6 +993,11 @@ case $state in (node) __puppet-node ;; + + # Display sub-commands for puppet parser. + (parser) + __puppet-parser + ;; esac ;; esac From 6dd78d676e34f6e385dd3ea80892cee21edd3f44 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:20:03 +0100 Subject: [PATCH 35/42] Add auto-completion for puppet plugin: Provides auto-complete options for puppet plugin sub-command. --- custom/plugins/puppet/_puppet | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9ba17db16..62d8fe3f9 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -412,6 +412,14 @@ _parser_arguments=( '--debug:Whether to log debug information' ) +local -a _plugin_arguments +_plugin_arguments=( + 'download:Download plugins from the puppet master' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () @@ -849,6 +857,23 @@ __puppet-parser () esac } +__puppet-plugin () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _plugin_arguments + return + ;; + esac +} + local expl @@ -998,6 +1023,11 @@ case $state in (parser) __puppet-parser ;; + + # Display sub-commands for puppet plugin. + (plugin) + __puppet-plugin + ;; esac ;; esac From 714da4218bcffb5d36da6b760ec01d27a6374941 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:37:48 +0100 Subject: [PATCH 36/42] Add auto-completion for puppet report: Provides auto-complete options for puppet report sub-command. --- custom/plugins/puppet/_puppet | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 62d8fe3f9..83c01be8e 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -420,6 +420,18 @@ _plugin_arguments=( '--debug:Whether to log debug information' ) +local -a _report_arguments +_report_arguments=( + 'info:Print the default terminus class for this face' + 'save:API only: submit a report' + 'submit:API only: submit a report with error handling' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () @@ -874,6 +886,23 @@ __puppet-plugin () esac } +__puppet-report () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _report_arguments + return + ;; + esac +} + local expl @@ -1028,6 +1057,11 @@ case $state in (plugin) __puppet-plugin ;; + + # Display sub-commands for puppet report. + (report) + __puppet-report + ;; esac ;; esac From dc1d497b8799432a916ae4963d192d2c74fd182a Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:49:09 +0100 Subject: [PATCH 37/42] Add auto-completion for puppet resource: Provides auto-complete options for puppet resource sub-command. --- custom/plugins/puppet/_puppet | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 83c01be8e..ad1a68193 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -432,6 +432,24 @@ _report_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _resource_arguments +_resource_arguments=( + '-h:Print this help message' + '--help:Print this help message' + '-d:Enable full debugging' + '--debug:Enable full debugging' + '-v:Print extra information' + '--verbose:Print extra information' + '-e:Write the results of the query to a file' + '--edit:Write the results of the query to a file' + '-H: When specified, connect to the resource server on the named host and retrieve the list of resouces of the type specified' + '--host: When specified, connect to the resource server on the named host and retrieve the list of resouces of the type specified' + '-p: Add more parameters to be outputted from queries' + '--param: Add more parameters to be outputted from queries' + '-t:List all available types' + '--types:List all available types' +) + __task_list () @@ -903,6 +921,23 @@ __puppet-report () esac } +__puppet-resource () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _resource_arguments + return + ;; + esac +} + local expl @@ -1062,6 +1097,11 @@ case $state in (report) __puppet-report ;; + + # Display sub-commands for puppet resource. + (resource) + __puppet-resource + ;; esac ;; esac From 207ce1ec8ac5046a3a21bb0bcbc579224d08b8c6 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:53:14 +0100 Subject: [PATCH 38/42] Add auto-completion for puppet resource_type: Provides auto-complete options for puppet resource_type sub-command. --- custom/plugins/puppet/_puppet | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index ad1a68193..f2ad25ed9 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -450,6 +450,18 @@ _resource_arguments=( '--types:List all available types' ) +local -a _resource_type_arguments +_resource_type_arguments=( + 'find:Retrieve info about a resource collection' + 'info:Print the default terminus class for this face' + 'search:Search for collections matching a regular expression' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () @@ -938,6 +950,23 @@ __puppet-resource () esac } +__puppet-resource_type () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _resource_type_arguments + return + ;; + esac +} + local expl @@ -1102,6 +1131,11 @@ case $state in (resource) __puppet-resource ;; + + # Display sub-commands for puppet resource_type. + (resource_type) + __puppet-resource_type + ;; esac ;; esac From fd1cfa64327013f7e78818f12feca522c20ace10 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:56:57 +0100 Subject: [PATCH 39/42] Add auto-completion for puppet secret_agent: Provides auto-complete options for puppet secret_agent sub-command. --- custom/plugins/puppet/_puppet | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index f2ad25ed9..9fbe37e37 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -462,6 +462,14 @@ _resource_type_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _secret_agent_arguments +_secret_agent_arguments=( + 'synchronize:Run secret_agent once' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () @@ -967,6 +975,23 @@ __puppet-resource_type () esac } +__puppet-secret_agent () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _secret_agent_arguments + return + ;; + esac +} + local expl @@ -1136,6 +1161,11 @@ case $state in (resource_type) __puppet-resource_type ;; + + # Display sub-commands for puppet secret_agent. + (secret_agent) + __puppet-secret_agent + ;; esac ;; esac From 13b0153456836b58c612683d75ec14ec8a595757 Mon Sep 17 00:00:00 2001 From: Mark Small Date: Mon, 5 May 2014 22:59:38 +0100 Subject: [PATCH 40/42] Add auto-completion for puppet status: Provides auto-complete options for puppet status sub-command. --- custom/plugins/puppet/_puppet | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9fbe37e37..5eae7bce3 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -470,6 +470,17 @@ _secret_agent_arguments=( '--debug:Whether to log debug information' ) +local -a _status_arguments +_status_arguments=( + 'find:Check status of puppet master server' + 'info:Print the default terminus class for this face' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () @@ -992,6 +1003,23 @@ __puppet-secret_agent () esac } +__puppet-status () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _status_arguments + return + ;; + esac +} + local expl @@ -1166,6 +1194,11 @@ case $state in (secret_agent) __puppet-secret_agent ;; + + # Display sub-commands for puppet status. + (status) + __puppet-status + ;; esac ;; esac From 39dce955c7e8035a7724fd15a789c17bf4c4f2ef Mon Sep 17 00:00:00 2001 From: Mark Small Date: Thu, 8 May 2014 20:12:37 +0100 Subject: [PATCH 41/42] Removed unnecessary command. --- custom/plugins/puppet/_puppet | 1 - 1 file changed, 1 deletion(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 5eae7bce3..2f64bd52c 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -1023,7 +1023,6 @@ __puppet-status () local expl -#local -a boxes installed_boxes local curcontext="$curcontext" state line typeset -A opt_args From 052412189a46bc383af0c64939e78f2b8a6b5e9a Mon Sep 17 00:00:00 2001 From: Mark Small Date: Thu, 8 May 2014 20:13:10 +0100 Subject: [PATCH 42/42] Changed description. --- custom/plugins/puppet/_puppet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 2f64bd52c..567c0155f 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -1033,7 +1033,7 @@ _arguments -C \ case $state in (command) - _describe -t commands "gem subcommand" _1st_arguments + _describe -t commands "sub-commands" _1st_arguments return ;;