Class: Chef::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/consul/node.rb

Defined Under Namespace

Classes: AttributeDoesNotExistError

Instance Method Summary collapse

Instance Method Details

#all_services(name) ⇒ Object



37
38
39
# File 'lib/chef/consul/node.rb', line 37

def all_services(name)
  ::Diplomat::Service.get(name, :all)
end

#first_service(name) ⇒ Object



33
34
35
# File 'lib/chef/consul/node.rb', line 33

def first_service(name)
  ::Diplomat::Service.get(name)
end

#get_consul_key(key, recursive = false) ⇒ Object



41
42
43
# File 'lib/chef/consul/node.rb', line 41

def get_consul_key(key, recursive = false)
  ::Diplomat::Kv.get(key, recurse: recursive)
end

#put_consul_key(key, value) ⇒ Object



45
46
47
# File 'lib/chef/consul/node.rb', line 45

def put_consul_key(key, value)
  ::Diplomat::Kv.put(key, value)
end