Class: Rollo::Model::Host
- Inherits:
-
Object
- Object
- Rollo::Model::Host
- Defined in:
- lib/rollo/model/host.rb
Instance Method Summary collapse
- #healthy? ⇒ Boolean
- #id ⇒ Object
- #in_service? ⇒ Boolean
-
#initialize(instance) ⇒ Host
constructor
A new instance of Host.
- #terminate ⇒ Object
Constructor Details
#initialize(instance) ⇒ Host
Returns a new instance of Host.
6 7 8 |
# File 'lib/rollo/model/host.rb', line 6 def initialize(instance) @instance = instance end |
Instance Method Details
#healthy? ⇒ Boolean
22 23 24 |
# File 'lib/rollo/model/host.rb', line 22 def healthy? @instance.health_status == 'Healthy' end |
#id ⇒ Object
10 11 12 |
# File 'lib/rollo/model/host.rb', line 10 def id @instance.id end |
#in_service? ⇒ Boolean
18 19 20 |
# File 'lib/rollo/model/host.rb', line 18 def in_service? @instance.lifecycle_state == 'InService' end |
#terminate ⇒ Object
14 15 16 |
# File 'lib/rollo/model/host.rb', line 14 def terminate @instance.terminate(should_decrement_desired_capacity: false) end |