Module: Fog::Vcloud::Compute::Helpers::Status
Instance Method Summary collapse
Instance Method Details
#friendly_status ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rackspace-fog/vcloud/models/compute/helpers/status.rb', line 6 def friendly_status load_unless_loaded! case status when '0' 'creating' when '8' 'off' when '4' 'on' else 'unknown' end end |
#off? ⇒ Boolean
25 26 27 28 |
# File 'lib/rackspace-fog/vcloud/models/compute/helpers/status.rb', line 25 def off? reload_status status == '8' end |
#on? ⇒ Boolean
20 21 22 23 |
# File 'lib/rackspace-fog/vcloud/models/compute/helpers/status.rb', line 20 def on? reload_status status == '4' end |
#reload_status ⇒ Object
30 31 32 |
# File 'lib/rackspace-fog/vcloud/models/compute/helpers/status.rb', line 30 def reload_status reload # always ensure we have the correct status end |