class Serverspec::Type::ConsulNode
Public Instance Methods
datacenter()
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 16 def datacenter inspection['Node']['Datacenter'] end
has_datacenter?(dc)
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 12 def has_datacenter?(dc) datacenter == dc end
has_service?(service_name)
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 20 def has_service?(service_name) service(service_name) != nil end
inspection()
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 32 def inspection @inspection ||= ::MultiJson.load(get_inspection.stdout) end
service(service_name)
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 24 def service(service_name) services.find service_name end
services()
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 28 def services inspection['Services'] end
url()
click to toggle source
# File lib/serverspec_extra_types/types/consul_node.rb, line 8 def url "#{@url_base}/v1/catalog/node/#{@name}" end