Sha256: 2c98c1acc785365e729806daf19108b7fe25013eb83ea04802beae09b46820ec

Contents?: true

Size: 429 Bytes

Versions: 2

Compression:

Stored size: 429 Bytes

Contents

module Kontena::Cli::Stacks
  module YAML
    class Opto::Resolvers::VaultCertPrompt < Opto::Resolver
      include Kontena::Cli::Common

      def resolve
        message = hint || 'Select SSL certs'
        secrets = client.get("grids/#{current_grid}/secrets")['secrets'].select{ |s|
          s['name'].match(/(ssl|cert)/i)
        }
        prompt.multi_select(hint, secrets.map{ |s| s['name'] })
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kontena-cli-1.1.0 lib/kontena/cli/stacks/yaml/opto/vault_cert_prompt_resolver.rb
kontena-cli-1.1.0.rc2 lib/kontena/cli/stacks/yaml/opto/vault_cert_prompt_resolver.rb