Class: Wakame::Actions::PropagateService
- Inherits:
-
Wakame::Action
- Object
- Wakame::Action
- Wakame::Actions::PropagateService
- Defined in:
- lib/wakame/actions/propagate_service.rb
Constant Summary
Constants included from AttributeHelper
AttributeHelper::CLASS_TYPE_KEY, AttributeHelper::CONVERT_CLASSES, AttributeHelper::PRIMITIVE_CLASSES
Instance Attribute Summary
Attributes inherited from Wakame::Action
Instance Method Summary collapse
-
#initialize(svc, cloud_host_id = nil) ⇒ PropagateService
constructor
A new instance of PropagateService.
- #run ⇒ Object
Methods inherited from Wakame::Action
#acquire_lock, #actor_request, #agent_monitor, #all_subactions_complete?, #flush_subactions, #master, #notes, #notify, #on_canceled, #on_failed, #service_cluster, #status=, #subactions, #sync_actor_request, #trigger_action, #walk_subactions
Methods included from ThreadImmutable
#bind_thread, included, #target_thread, #target_thread?, #thread_check
Methods included from AttributeHelper
#dump_attrs, #retrieve_attr_attribute
Constructor Details
#initialize(svc, cloud_host_id = nil) ⇒ PropagateService
Returns a new instance of PropagateService.
5 6 7 8 9 |
# File 'lib/wakame/actions/propagate_service.rb', line 5 def initialize(svc, cloud_host_id=nil) raise ArgumentError unless svc.is_a?(Wakame::Service::ServiceInstance) @svc = svc @cloud_host_id = cloud_host_id end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/wakame/actions/propagate_service.rb', line 12 def run acquire_lock(@svc.resource.class.to_s) newsvc = nil StatusDB. { newsvc = cluster.propagate_service(@svc.id, @cloud_host_id) } trigger_action(StartService.new(newsvc)) flush_subactions end |