Class: Cloudkick::Node
Instance Attribute Summary collapse
-
#agent_state ⇒ Object
readonly
Returns the value of attribute agent_state.
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ipaddress ⇒ Object
readonly
Returns the value of attribute ipaddress.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#provider_id ⇒ Object
readonly
Returns the value of attribute provider_id.
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #check(type = nil) ⇒ Object
-
#initialize(agent_state, color, id, ipaddress, name, provider_id, provider_name, status, tags) ⇒ Node
constructor
A new instance of Node.
Methods inherited from Base
#access_token, #consumer, #get
Constructor Details
#initialize(agent_state, color, id, ipaddress, name, provider_id, provider_name, status, tags) ⇒ Node
Returns a new instance of Node.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cloudkick/node.rb', line 23 def initialize(agent_state, color, id, ipaddress, name, provider_id, provider_name, status, ) @agent_state = agent_state @color = color @id = id @ipaddress = ipaddress @name = name @provider_id = provider_id @provider_name = provider_name @status = status @tags = end |
Instance Attribute Details
#agent_state ⇒ Object (readonly)
Returns the value of attribute agent_state.
20 21 22 |
# File 'lib/cloudkick/node.rb', line 20 def agent_state @agent_state end |
#color ⇒ Object (readonly)
Returns the value of attribute color.
20 21 22 |
# File 'lib/cloudkick/node.rb', line 20 def color @color end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/cloudkick/node.rb', line 20 def id @id end |
#ipaddress ⇒ Object (readonly)
Returns the value of attribute ipaddress.
20 21 22 |
# File 'lib/cloudkick/node.rb', line 20 def ipaddress @ipaddress end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/cloudkick/node.rb', line 20 def name @name end |
#provider_id ⇒ Object (readonly)
Returns the value of attribute provider_id.
21 22 23 |
# File 'lib/cloudkick/node.rb', line 21 def provider_id @provider_id end |
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
21 22 23 |
# File 'lib/cloudkick/node.rb', line 21 def provider_name @provider_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
21 22 23 |
# File 'lib/cloudkick/node.rb', line 21 def status @status end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
21 22 23 |
# File 'lib/cloudkick/node.rb', line 21 def @tags end |
Instance Method Details
#check(type = nil) ⇒ Object
36 37 38 39 40 |
# File 'lib/cloudkick/node.rb', line 36 def check(type=nil) resp, data = access_token.get("/1.0/query/node/#{@id}/check/#{type}") Crack::JSON.parse(data) end |