Sha256: 6bcc862216c386087e575af611982ce1a8377432686ca77fb6aa3c4f7f1d76f5
Contents?: true
Size: 843 Bytes
Versions: 42
Compression:
Stored size: 843 Bytes
Contents
module Kontena::Cli::Certificate class ExportCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions parameter "SUBJECT", "Certificate subject" requires_current_master requires_current_master_token requires_current_grid option ['--certificate', '--cert'], :flag, "Output certificate" option ['--chain'], :flag, "Output chain" option ['--private-key', '--key'], :flag, "Output private key" def bundle? ![certificate?, chain?, private_key?].any? end def execute certificate = client.get("certificates/#{current_grid}/#{self.subject}/export") puts certificate['certificate'] if certificate? || bundle? puts certificate['chain'] if chain? || bundle? puts certificate['private_key'] if private_key? || bundle? end end end
Version data entries
42 entries across 42 versions & 2 rubygems