class Kontena::Cli::Etcd::RemoveCommand

Public Instance Methods

execute() click to toggle source
# File lib/kontena/cli/etcd/remove_command.rb, line 14
def execute
  require_api_url
  token = require_token
  validate_key
  confirm unless forced?

  data = {}
  data[:recursive] = true if recursive?
  response = client(token).delete("etcd/#{current_grid}/#{key}", data)

  if response['error']
    exit_with_error response['error']
  end
end