lib/kontena/cli/etcd/set_command.rb in kontena-cli-0.9.3 vs lib/kontena/cli/etcd/set_command.rb in kontena-cli-0.10.0

- old
+ new

@@ -1,14 +1,19 @@ +require_relative 'common' + module Kontena::Cli::Etcd class SetCommand < Clamp::Command include Kontena::Cli::Common + include Common parameter "KEY", "Etcd key" parameter "VALUE", "Etcd value" def execute require_api_url token = require_token + validate_key + data = {value: value} response = client(token).post("etcd/#{current_grid}/#{key}", data) if response['error'] abort response['error'] end