Sha256: af10a6de8e62a5ebc63fbf7fbf95113f2e3b2655a9e47e2dde3ab2c9e7435935

Contents?: true

Size: 477 Bytes

Versions: 22

Compression:

Stored size: 477 Bytes

Contents

module Kontena::Cli::Vault
  class ReadCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter "NAME", "Secret name"

    def execute
      require_api_url
      require_current_grid

      token = require_token
      result = client(token).get("secrets/#{current_grid}/#{name}")
      puts "#{result['name']}:"
      puts "  created_at: #{result['created_at']}"
      puts "  value: #{result['value']}"
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.4 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.0 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.7 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.6 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.5 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.4 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.14.2 lib/kontena/cli/vault/read_command.rb