Class: LeoFSManager::Status::Node

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

Overview

Node Status Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ Node

Returns a new instance of Node.



70
71
72
73
74
75
76
77
78
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 70

def initialize(h)
  @type  = h[:type]
  @node  = h[:node]
  @when  = Time.parse(h[:when])
  @state = h[:state]
  #XXX: these are written in hex
  @ring_cur  = h[:ring_cur]
  @ring_prev = h[:ring_prev]
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def node
  @node
end

#ring_curObject (readonly)

Returns the value of attribute ring_cur.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def ring_cur
  @ring_cur
end

#ring_prevObject (readonly)

Returns the value of attribute ring_prev.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def ring_prev
  @ring_prev
end

#stateObject (readonly)

Returns the value of attribute state.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def state
  @state
end

#typeObject (readonly)

Returns the value of attribute type.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def type
  @type
end

#whenObject (readonly) Also known as: joined_at

Returns the value of attribute when.



68
69
70
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68

def when
  @when
end