Sha256: c21bbde63da26a1499089a3a094213cf165ed42ebb9584f2ec3013c123107970

Contents?: true

Size: 429 Bytes

Versions: 8

Compression:

Stored size: 429 Bytes

Contents

module Kontena::Cli::Vault
  class ListCommand < Clamp::Command
    include Kontena::Cli::Common

    def execute
      require_api_url
      token = require_token
      result = client(token).get("grids/#{current_grid}/secrets")
      puts '%-30.30s %-30.30s' % ['NAME', 'CREATED AT']
      result['secrets'].each do |secret|
        puts '%-30.30s %-30.30s' % [secret['name'], secret['created_at']]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kontena-cli-0.11.7 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.6 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.5 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.4 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.3 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.2 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.1 lib/kontena/cli/vault/list_command.rb
kontena-cli-0.11.0 lib/kontena/cli/vault/list_command.rb