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
kontena-cli-1.4.1.rc1 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.1.pre1 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.3.5 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.3.5.rc1 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.rc2 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.rc1 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre14 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre13 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre12 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre11 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre10 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre9 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre8 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre7 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre6 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre5 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre4 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre3 lib/kontena/cli/master/config/get_command.rb
kontena-cli-1.4.0.pre2 lib/kontena/cli/master/config/get_command.rb