Class: LeoManager::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/leo_manager_models.rb

Overview

System Information Model

Defined Under Namespace

Classes: GatewayStat, NodeInfo, NodeStat, StorageStat, System

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ Status

Returns a new instance of Status.



56
57
58
59
60
61
62
# File 'lib/leo_manager_models.rb', line 56

def initialize(h)
  @system_info  = System.new(h[:system_info]) if h.has_key?(:system_info)
  @node_stat    = NodeStat.new(h[:node_stat]) if h.has_key?(:node_stat)
  @storage_stat = StorageStat.new(h[:node_stat]) if h.has_key?(:node_stat)
  @gateway_stat = GatewayStat.new(h[:node_stat]) if h.has_key?(:node_stat)
  @node_list = h[:node_list].map {|node| NodeInfo.new(node) } if h.has_key?(:node_list)
end

Instance Attribute Details

#gateway_statObject (readonly)

Gateway Status



52
53
54
# File 'lib/leo_manager_models.rb', line 52

def gateway_stat
  @gateway_stat
end

#node_listObject (readonly)

Array of Node



54
55
56
# File 'lib/leo_manager_models.rb', line 54

def node_list
  @node_list
end

#node_statObject (readonly)

Node Status



48
49
50
# File 'lib/leo_manager_models.rb', line 48

def node_stat
  @node_stat
end

#storage_statObject (readonly)

Storage Status



50
51
52
# File 'lib/leo_manager_models.rb', line 50

def storage_stat
  @storage_stat
end

#system_infoObject (readonly)

System



46
47
48
# File 'lib/leo_manager_models.rb', line 46

def system_info
  @system_info
end