class Ufo::Apps::Service
Public Class Methods
new(service, options)
click to toggle source
# File lib/ufo/apps/service.rb, line 5 def initialize(service, options) @service = service @options = options end
Public Instance Methods
cfn_map()
click to toggle source
# File lib/ufo/apps/service.rb, line 22 def cfn_map @cfn_map ||= CfnMap.new(@options).map end
dns()
click to toggle source
# File lib/ufo/apps/service.rb, line 45 def dns return 'dns' if ENV['TEST'] elb = info.load_balancer(@service) elb.dns_name if elb end
info()
click to toggle source
# File lib/ufo/apps/service.rb, line 51 def info Ufo::Info.new(@service) end
launch_type()
click to toggle source
# File lib/ufo/apps/service.rb, line 18 def launch_type @service["launch_type"] end
name()
click to toggle source
# File lib/ufo/apps/service.rb, line 31 def name actual_service_name = @service["service_name"] pretty_name = cfn_map[actual_service_name] if pretty_name "#{actual_service_name} (#{pretty_name})" else actual_service_name end end
running()
click to toggle source
# File lib/ufo/apps/service.rb, line 41 def running @service["running_count"] end
task_definition()
click to toggle source
# File lib/ufo/apps/service.rb, line 14 def task_definition @service["task_definition"].split('/').last end
to_a()
click to toggle source
# File lib/ufo/apps/service.rb, line 10 def to_a [name, task_definition, running, launch_type, ufo?] end
ufo?()
click to toggle source
# File lib/ufo/apps/service.rb, line 26 def ufo? yes = !!cfn_map[@service["service_name"]] yes ? "yes" : "no" end