diff --git a/lib/puppet/face/certificate_request.rb b/lib/puppet/face/certificate_request.rb index aa29195fc..e4855e987 100644 --- a/lib/puppet/face/certificate_request.rb +++ b/lib/puppet/face/certificate_request.rb @@ -1,52 +1,54 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:certificate_request, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Manage certificate requests." description <<-EOT This subcommand retrieves and submits certificate signing requests (CSRs). EOT deactivate_action(:destroy) find = get_action(:find) find.summary "Retrieve a single CSR." - find.arguments "" + find.arguments "[]" find.render_as = :s find.returns <<-EOT A single certificate request. When used from the Ruby API, returns a Puppet::SSL::CertificateRequest object. + + Defaults to the current nodes certname. EOT find.examples <<-EOT Retrieve a single CSR from the puppet master's CA: $ puppet certificate_request find somenode.puppetlabs.lan --terminus rest EOT search = get_action(:search) search.summary "Retrieve all outstanding CSRs." search.arguments "" search.render_as = :s search.returns <<-EOT A list of certificate requests. When used from the Ruby API, returns an array of Puppet::SSL::CertificateRequest objects. EOT search.short_description <<-EOT Retrieves all outstanding certificate signing requests. Due to a known bug, this action requires a dummy search key, the content of which is irrelevant. EOT search.notes <<-EOT Although this action always returns all CSRs, it requires a dummy search key; this is a known bug. EOT search.examples <<-EOT Retrieve all CSRs from the local CA (similar to 'puppet cert list'): $ puppet certificate_request search x --terminus ca EOT get_action(:save).summary "API only: submit a certificate signing request." get_action(:save).arguments "" end diff --git a/lib/puppet/face/certificate_revocation_list.rb b/lib/puppet/face/certificate_revocation_list.rb index a004a0db2..36f507839 100644 --- a/lib/puppet/face/certificate_revocation_list.rb +++ b/lib/puppet/face/certificate_revocation_list.rb @@ -1,57 +1,54 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:certificate_revocation_list, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Manage the list of revoked certificates." description <<-EOT This subcommand is primarily for retrieving the certificate revocation list from the CA. EOT find = get_action(:find) find.summary "Retrieve the certificate revocation list." - find.arguments "" find.render_as = :s find.returns <<-EOT The certificate revocation list. When used from the Ruby API: returns an OpenSSL::X509::CRL object. EOT find.short_description <<-EOT - Retrieves the certificate revocation list. Due to a known bug, this action - requires a dummy argument, the content of which is irrelevant. + Retrieves the certificate revocation list. EOT find.notes <<-EOT - Although this action always returns the CRL from the specified terminus, it - requires a dummy argument; this is a known bug. + Although this action always returns the CRL from the specified terminus. EOT find.examples <<-EXAMPLES Retrieve a copy of the puppet master's CRL: - $ puppet certificate_revocation_list find crl --terminus rest + $ puppet certificate_revocation_list find --terminus rest EXAMPLES destroy = get_action(:destroy) destroy.summary "Delete the certificate revocation list." destroy.arguments "" destroy.returns "Nothing." destroy.description <<-EOT Deletes the certificate revocation list. This cannot be done over REST, but it is possible to delete the locally cached copy or the local CA's copy of the CRL. EOT destroy.short_description <<-EOT Deletes the certificate revocation list. This cannot be done over REST, but it is possible to delete the locally cached copy or the local CA's copy of the CRL. Due to a known bug, this action requires a dummy argument, the content of which is irrelevant. EOT destroy.notes <<-EOT Although this action always deletes the CRL from the specified terminus, it requires a dummy argument; this is a known bug. EOT deactivate_action(:search) deactivate_action(:save) end diff --git a/lib/puppet/face/status.rb b/lib/puppet/face/status.rb index 3003dc484..932585308 100644 --- a/lib/puppet/face/status.rb +++ b/lib/puppet/face/status.rb @@ -1,52 +1,47 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:status, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "View puppet server status." deactivate_action(:destroy) deactivate_action(:save) deactivate_action(:search) find = get_action(:find) find.default = true find.summary "Check status of puppet master server." - find.arguments "" find.returns <<-'EOT' A "true" response or a low-level connection error. When used from the Ruby API: returns a Puppet::Status object. EOT find.description <<-'EOT' Checks whether a Puppet server is properly receiving and processing HTTP requests. This action is only useful when used with '--terminus rest'; when invoked with the `local` terminus, `find` will always return true. Over REST, this action will query the configured puppet master by default. To query other servers, including puppet agent nodes started with the <--listen> option, you can set the global <--server> and <--masterport> options on the command line; note that agent nodes listen on port 8139. EOT find.short_description <<-EOT Checks whether a Puppet server is properly receiving and processing HTTP - requests. Due to a known bug, this action requires a dummy argument, the - content of which is irrelevant. This action is only useful when used with - '--terminus rest', and will always return true when invoked locally. + requests. This action is only useful when used with '--terminus rest', + and will always return true when invoked locally. EOT find.notes <<-'EOT' This action requires that the server's `auth.conf` file allow find access to the `status` REST terminus. Puppet agent does not use this facility, and it is turned off by default. See for more details. - - Although this action always returns an unnamed status object, it requires a - dummy argument. This is a known bug. EOT find.examples <<-'EOT' Check the status of the configured puppet master: - $ puppet status find x --terminus rest + $ puppet status find --terminus rest EOT end