Class: TcServer::NodeInstance
- Inherits:
-
Shared::NodeInstance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::NodeInstance
- TcServer::NodeInstance
- Defined in:
- lib/vas/tc_server/node_instances.rb
Overview
A tc Server node instance
Instance Attribute Summary collapse
-
#layout ⇒ String
readonly
The instance’s layout.
-
#runtime_version ⇒ String
readonly
The version of runtime used by the instance.
-
#services ⇒ Hash
readonly
The instance’s services.
Attributes inherited from Shared::NodeInstance
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#applications ⇒ NodeApplications
The instance’s applications.
-
#initialize(location, client) ⇒ NodeInstance
constructor
A new instance of NodeInstance.
-
#reload ⇒ void
Reloads the instance’s details from the server.
-
#to_s ⇒ String
A string representation of the instance.
Methods inherited from Shared::NodeInstance
#group_instance, #live_configurations, #logs, #node
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ NodeInstance
Returns a new instance of NodeInstance.
42 43 44 45 46 47 48 |
# File 'lib/vas/tc_server/node_instances.rb', line 42 def initialize(location, client) super(location, client, Node, Logs, Instance, 'group-instance', NodeLiveConfigurations) @layout = details['layout'] @applications_location = Util::LinkUtils.get_link_href(details, 'node-applications') end |
Instance Attribute Details
#layout ⇒ String (readonly)
Returns the instance’s layout.
33 34 35 |
# File 'lib/vas/tc_server/node_instances.rb', line 33 def layout @layout end |
#runtime_version ⇒ String (readonly)
Returns the version of runtime used by the instance.
36 37 38 |
# File 'lib/vas/tc_server/node_instances.rb', line 36 def runtime_version @runtime_version end |
#services ⇒ Hash (readonly)
Returns the instance’s services.
39 40 41 |
# File 'lib/vas/tc_server/node_instances.rb', line 39 def services @services end |
Instance Method Details
#applications ⇒ NodeApplications
Returns the instance’s applications.
59 60 61 |
# File 'lib/vas/tc_server/node_instances.rb', line 59 def applications @applications ||= NodeApplications.new(@applications_location, client) end |
#reload ⇒ void
This method returns an undefined value.
Reloads the instance’s details from the server
52 53 54 55 56 |
# File 'lib/vas/tc_server/node_instances.rb', line 52 def reload super @runtime_version = details['runtime-version'] @services = details['services'] end |
#to_s ⇒ String
Returns a string representation of the instance.
64 65 66 |
# File 'lib/vas/tc_server/node_instances.rb', line 64 def to_s "#<#{self.class} name='#{name}' layout='#@layout' runtime_version='#@runtime_version' services='#@services'>" end |