lib/kontena/cli/etcd/get_command.rb in kontena-cli-0.11.7 vs lib/kontena/cli/etcd/get_command.rb in kontena-cli-0.12.0
- old
+ new
@@ -1,18 +1,19 @@
require_relative 'common'
module Kontena::Cli::Etcd
class GetCommand < 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
-
+
response = client(token).get("etcd/#{current_grid}/#{key}")
if response['value']
puts response['value']
elsif response['children']
abort "Cannot get value from a directory"