Sha256: bb25f9fa96249d2c037aecd1e8a9b1af987c122b7d1742de0dc67cc8b0d9321c

Contents?: true

Size: 477 Bytes

Versions: 32

Compression:

Stored size: 477 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Etcd
  class MkdirCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include Common

    parameter "KEY", "Etcd key"

    def execute
      require_api_url
      token = require_token
      validate_key

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.4 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.3 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.2 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.1 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.0 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.7 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.6 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.5 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.4 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.3 lib/kontena/cli/etcd/mkdir_command.rb
kontena-cli-0.14.2 lib/kontena/cli/etcd/mkdir_command.rb