class Serverspec::Type::ConsulServiceList

Public Instance Methods

has_service?(service) click to toggle source
# File lib/serverspec_extra_types/types/consul_service_list.rb, line 18
def has_service?(service)
  services.include? service
end
inspection() click to toggle source
# File lib/serverspec_extra_types/types/consul_service_list.rb, line 26
def inspection
  @inspection ||= ::MultiJson.load(get_inspection.stdout)
end
services() click to toggle source
# File lib/serverspec_extra_types/types/consul_service_list.rb, line 22
def services
  inspection.keys
end
to_s() click to toggle source
# File lib/serverspec_extra_types/types/consul_service_list.rb, line 12
def to_s
  msg = 'Consul Service List'
  msg << %( with acl token: "#{@token}") if @token
  msg
end
url() click to toggle source
# File lib/serverspec_extra_types/types/consul_service_list.rb, line 8
def url
  "#{@url_base}/v1/catalog/services"
end