Class: Shared::NodeInstance Abstract
- Inherits:
-
StateResource
- Object
- Resource
- StateResource
- Shared::NodeInstance
- Defined in:
- lib/vas/shared/node_instances.rb
Overview
This class is abstract.
A node instance, i.e. an instance on an individual node
Direct Known Subclasses
Gemfire::AgentNodeInstance, Gemfire::CacheServerNodeInstance, Gemfire::LocatorNodeInstance, RabbitMq::NodeInstance, TcServer::NodeInstance
Instance Attribute Summary collapse
-
#group_instance ⇒ Instance
readonly
The node instance’s group instance.
-
#logs ⇒ Logs
readonly
The instance’s Logs.
-
#name ⇒ String
readonly
The instance’s name.
-
#node ⇒ GroupableNode
readonly
The node that contains this instance.
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(location, client, node_class, logs_class, group_instance_class, group_instance_type) ⇒ NodeInstance
constructor
A new instance of NodeInstance.
-
#to_s ⇒ String
A string representation of the node instance.
Methods inherited from StateResource
Constructor Details
#initialize(location, client, node_class, logs_class, group_instance_class, group_instance_type) ⇒ NodeInstance
Returns a new instance of NodeInstance.
46 47 48 49 50 51 52 53 54 |
# File 'lib/vas/shared/node_instances.rb', line 46 def initialize(location, client, node_class, logs_class, group_instance_class, group_instance_type) #:nodoc: super(location, client) @name = details["name"] @node = node_class.new(Util::LinkUtils.get_link_href(details, "node"), client) @logs = logs_class.new(Util::LinkUtils.get_link_href(details, "logs"), client) @group_instance = group_instance_class.new(Util::LinkUtils.get_link_href(details, group_instance_type), client) end |
Instance Attribute Details
#group_instance ⇒ Instance (readonly)
Returns the node instance’s group instance.
43 44 45 |
# File 'lib/vas/shared/node_instances.rb', line 43 def group_instance @group_instance end |
#logs ⇒ Logs (readonly)
Returns the instance’s Logs.
40 41 42 |
# File 'lib/vas/shared/node_instances.rb', line 40 def logs @logs end |
#name ⇒ String (readonly)
Returns the instance’s name.
34 35 36 |
# File 'lib/vas/shared/node_instances.rb', line 34 def name @name end |
#node ⇒ GroupableNode (readonly)
Returns the node that contains this instance.
37 38 39 |
# File 'lib/vas/shared/node_instances.rb', line 37 def node @node end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the node instance.
57 58 59 |
# File 'lib/vas/shared/node_instances.rb', line 57 def to_s #:nodoc: "#<#{self.class} name='#@name'>" end |