Sha256: e86b563e392c0abf1f4d64d7da684b48402d188a84f8a6e7d06095c97594a42e

Contents?: true

Size: 419 Bytes

Versions: 4

Compression:

Stored size: 419 Bytes

Contents

module Kontena::Cli::Etcd
  class SetCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter "KEY", "Etcd key"
    parameter "VALUE", "Etcd value"

    def execute
      require_api_url
      token = require_token
      data = {value: value}
      response = client(token).post("etcd/#{current_grid}/#{key}", data)
      if response['error']
        abort response['error']
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kontena-cli-0.9.3 lib/kontena/cli/etcd/set_command.rb
kontena-cli-0.9.2 lib/kontena/cli/etcd/set_command.rb
kontena-cli-0.9.1 lib/kontena/cli/etcd/set_command.rb
kontena-cli-0.9.0 lib/kontena/cli/etcd/set_command.rb