Class: PEClient::Resource::PuppetCAV1::CertificateRevocationList

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/puppet_ca.v1/certificate_revocation_list.rb

Overview

The certificate_revocation_list endpoint retrieves a Certificate Revocation List (CRL) from the primary server. The returned CRL is always in the .pem format.

Constant Summary collapse

BASE_PATH =

The base path for Puppet CA API v1 Certificate Revocation List endpoints.

"#{PuppetCAV1::BASE_PATH}/certificate_revocation_list".freeze
HEADERS =

Common headers for Puppet CA API v1 Certificate Revocation List endpoints.

{"Content-Type": "text/plain", Accept: "text/plain"}.freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#getString

Get the submitted CRL

Returns:

  • (String)


36
37
38
# File 'lib/pe_client/resources/puppet_ca.v1/certificate_revocation_list.rb', line 36

def get
  @client.get "#{BASE_PATH}/ca", headers: HEADERS
end

#update(crls) ⇒ String

Update upstream CRLs

Parameters:

  • crls (String)

    PEM-encoded CRLs

Returns:

  • (String)


45
46
47
# File 'lib/pe_client/resources/puppet_ca.v1/certificate_revocation_list.rb', line 45

def update(crls)
  @client.put "#{BASE_PATH}/ca", body: crls, headers: HEADERS
end