Sha256: 56ee226fdd996b7cc97afa6dd1bf4f4246710a38036306a2b2061816ec050f6b

Contents?: true

Size: 553 Bytes

Versions: 76

Compression:

Stored size: 553 Bytes

Contents

module Kontena::Cli::Master::Config
  class GetCommand < Kontena::Command

    include Kontena::Cli::Common

    requires_current_master
    requires_current_master_token

    banner "Reads a configuration value from master"

    parameter "KEY", "Configuration key to read from master", required: true

    option ['-p', '--pair'], :flag, "Print key=value instead of only value"

    def response
      client.get("config/#{key}")
    end

    def execute
      value = response[key]
      print(key + '=') if pair?
      puts value
    end
  end
end

Version data entries

76 entries across 76 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/master/config/get_command.rb
krates-1.7.10 lib/kontena/cli/master/config/get_command.rb
krates-1.7.9 lib/kontena/cli/master/config/get_command.rb
krates-1.7.8 lib/kontena/cli/master/config/get_command.rb
krates-1.7.7 lib/kontena/cli/master/config/get_command.rb
krates-1.7.6 lib/kontena/cli/master/config/get_command.rb
krates-1.7.5 lib/kontena/cli/master/config/get_command.rb
krates-1.7.4 lib/kontena/cli/master/config/get_command.rb
krates-1.7.3 lib/kontena/cli/master/config/get_command.rb
krates-1.7.2 lib/kontena/cli/master/config/get_command.rb
krates-1.7.1 lib/kontena/cli/master/config/get_command.rb
krates-1.7.0 lib/kontena/cli/master/config/get_command.rb
krates-1.6.9 lib/kontena/cli/master/config/get_command.rb
krates-1.6.8 lib/kontena/cli/master/config/get_command.rb
krates-1.6.7 lib/kontena/cli/master/config/get_command.rb
krates-1.6.6 lib/kontena/cli/master/config/get_command.rb
krates-1.6.5 lib/kontena/cli/master/config/get_command.rb
krates-1.6.4 lib/kontena/cli/master/config/get_command.rb
krates-1.6.3 lib/kontena/cli/master/config/get_command.rb
krates-1.6.2 lib/kontena/cli/master/config/get_command.rb