Class: Distem::Resource::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/distem/resource/status.rb

Overview

Abstract representation of the status a resource can be in

Constant Summary

INIT =

The resource just finished to initialize

'INIT'
CONFIGURING =

The resource is configuring/busy

'CONFIGURING'
READY =

The resource is ready to use/run

'READY'
RUNNING =

The resource is currently running

"RUNNING"
DOWN =

The resource is down

'DOWN'
FROZEN =

The resource is frozen

'FROZEN'

Class Method Summary (collapse)

Class Method Details

+ (Boolean) valid?(status)

Returns if a status name is valid or not

Attributes

  • status The String value to test

Returns

Boolean value

Returns:

  • (Boolean)


26
27
28
# File 'lib/distem/resource/status.rb', line 26

def self.valid?(status)
  return [INIT,CONFIGURING,READY,RUNNING,DOWN,FROZEN].include?(status.upcase)
end