Class: TcServer::Node
- Inherits:
-
Shared::GroupableNode
- Object
- Shared::Resource
- Shared::Node
- Shared::GroupableNode
- TcServer::Node
- Defined in:
- lib/vas/tc_server/nodes.rb
Overview
A tc Server node
Instance Attribute Summary collapse
-
#java_home ⇒ String
readonly
The node’s Java home.
Attributes inherited from Shared::Node
#agent_home, #architecture, #host_names, #ip_addresses, #ipv4_addresses, #ipv6_addresses, #metadata, #operating_system
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Node
constructor
A new instance of Node.
-
#instances ⇒ NodeInstances
The node’s instances.
-
#reload ⇒ Object
Reloads the node’s details from the server.
-
#to_s ⇒ String
A string representation of the node.
Methods inherited from Shared::GroupableNode
Methods inherited from Shared::Node
Constructor Details
#initialize(location, client) ⇒ Node
Returns a new instance of Node.
36 37 38 39 |
# File 'lib/vas/tc_server/nodes.rb', line 36 def initialize(location, client) super(location, client, Group) @instance_location = Util::LinkUtils.get_link_href(details, 'node-instances') end |
Instance Attribute Details
#java_home ⇒ String (readonly)
Returns the node’s Java home.
33 34 35 |
# File 'lib/vas/tc_server/nodes.rb', line 33 def java_home @java_home end |
Instance Method Details
#instances ⇒ NodeInstances
Returns the node’s instances.
48 49 50 |
# File 'lib/vas/tc_server/nodes.rb', line 48 def instances @instances ||= NodeInstances.new(@instance_location, client) end |
#reload ⇒ Object
Reloads the node’s details from the server
42 43 44 45 |
# File 'lib/vas/tc_server/nodes.rb', line 42 def reload super @java_home = details['java-home'] end |
#to_s ⇒ String
Returns a string representation of the node.
53 54 55 |
# File 'lib/vas/tc_server/nodes.rb', line 53 def to_s "#<#{self.class} host_names='#{host_names}' ip_addresses='#{ip_addresses}' ipv4_addresses='#{ipv4_addresses}' ipv6_addresses='#{ipv6_addresses}' operating_system='#{}' architecture='#{architecture}' agent_home='#{agent_home}' java_home='#@java_home' metadata='#{}'>" end |