Class: Rollo::Model::Host
- Inherits:
-
Object
- Object
- Rollo::Model::Host
- Defined in:
- lib/rollo/model/host.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(instance) ⇒ Host
constructor
A new instance of Host.
- #is_healthy? ⇒ Boolean
- #is_in_service? ⇒ Boolean
- #terminate ⇒ Object
Constructor Details
#initialize(instance) ⇒ Host
Returns a new instance of Host.
4 5 6 |
# File 'lib/rollo/model/host.rb', line 4 def initialize(instance) @instance = instance end |
Instance Method Details
#id ⇒ Object
8 9 10 |
# File 'lib/rollo/model/host.rb', line 8 def id @instance.id end |
#is_healthy? ⇒ Boolean
20 21 22 |
# File 'lib/rollo/model/host.rb', line 20 def is_healthy? @instance.health_status == 'Healthy' end |
#is_in_service? ⇒ Boolean
16 17 18 |
# File 'lib/rollo/model/host.rb', line 16 def is_in_service? @instance.lifecycle_state == 'InService' end |
#terminate ⇒ Object
12 13 14 |
# File 'lib/rollo/model/host.rb', line 12 def terminate @instance.terminate(should_decrement_desired_capacity: false) end |