Class: Wakame::Service::Property
- Inherits:
-
Object
- Object
- Wakame::Service::Property
show all
- Includes:
- AttributeHelper
- Defined in:
- lib/wakame/service.rb
Constant Summary
AttributeHelper::CONVERT_CLASSES, AttributeHelper::PRIMITIVE_CLASSES
Instance Attribute Summary collapse
Instance Method Summary
collapse
#dump_attrs
Constructor Details
#initialize(check_time = 5) ⇒ Property
Returns a new instance of Property.
686
687
688
689
690
691
692
693
694
695
696
697
698
|
# File 'lib/wakame/service.rb', line 686
def initialize(check_time=5)
@check_time = check_time
@vm_spec = VmSpec.define {
environment(:EC2) { |ec2|
ec2.instance_type = 'm1.small'
ec2.availability_zone = 'us-east-1c'
ec2.security_groups = ['default']
}
environment(:StandAlone) {
}
}
end
|
Instance Attribute Details
#check_time ⇒ Object
Returns the value of attribute check_time.
679
680
681
|
# File 'lib/wakame/service.rb', line 679
def check_time
@check_time
end
|
#vm_spec ⇒ Object
Returns the value of attribute vm_spec.
679
680
681
|
# File 'lib/wakame/service.rb', line 679
def vm_spec
@vm_spec
end
|
Instance Method Details
#basedir ⇒ Object
700
701
702
|
# File 'lib/wakame/service.rb', line 700
def basedir
File.join(Wakame.config.root_path, 'cluster', 'resources', Util.snake_case(self.class))
end
|
#dump_status ⇒ Object
704
705
706
707
708
|
# File 'lib/wakame/service.rb', line 704
def dump_status
{:type => self.class.to_s, :min_instances => min_instances, :max_instances=> max_instances,
:duplicable=>duplicable
}
end
|
#on_child_changed(service_instance, action) ⇒ Object
def before_start(service_instance, action) end def after_start(service_instance, action) end def before_stop(service_instance, action) end def after_stop(service_instance, action) end
726
727
|
# File 'lib/wakame/service.rb', line 726
def on_child_changed(service_instance, action)
end
|
#on_parent_changed(service_instance, action) ⇒ Object
728
729
|
# File 'lib/wakame/service.rb', line 728
def on_parent_changed(service_instance, action)
end
|
#reload(service_instance, action) ⇒ Object
712
|
# File 'lib/wakame/service.rb', line 712
def reload(service_instance, action); end
|
#render_config(template) ⇒ Object
714
715
|
# File 'lib/wakame/service.rb', line 714
def render_config(template)
end
|
#start(service_instance, action) ⇒ Object
710
|
# File 'lib/wakame/service.rb', line 710
def start(service_instance, action); end
|
#stop(service_instance, action) ⇒ Object
711
|
# File 'lib/wakame/service.rb', line 711
def stop(service_instance, action); end
|