Class: TcServer::NodeApplication
- Inherits:
-
Shared::Resource
- Object
- Shared::Resource
- TcServer::NodeApplication
- Defined in:
- lib/vas/tc_server/node_applications.rb
Overview
An application on a node instance
Instance Attribute Summary collapse
-
#context_path ⇒ String
readonly
The application’s context path.
-
#host ⇒ String
readonly
The host the application will deploy its revisions to.
-
#name ⇒ String
readonly
The application’s name.
-
#service ⇒ String
readonly
The service the application will deploy its revisions to.
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#group_application ⇒ Application
The application that this node application is a member of.
-
#initialize(location, client) ⇒ NodeApplication
constructor
A new instance of NodeApplication.
-
#instance ⇒ NodeInstance
The node instance that contains the application.
-
#revisions ⇒ NodeRevisions
The application’s revisions.
-
#to_s ⇒ String
A string representation of the node application.
Constructor Details
#initialize(location, client) ⇒ NodeApplication
Returns a new instance of NodeApplication.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/vas/tc_server/node_applications.rb', line 45 def initialize(location, client) super(location, client) @group_application_location = Util::LinkUtils.get_link_href(details, 'group-application') @instance_location = Util::LinkUtils.get_link_href(details, 'node-instance') @revisions_location = Util::LinkUtils.get_link_href(details, 'node-revisions') @context_path = details['context-path'] @name = details['name'] @service = details['service'] @host = details['host'] end |
Instance Attribute Details
#context_path ⇒ String (readonly)
Returns the application’s context path.
33 34 35 |
# File 'lib/vas/tc_server/node_applications.rb', line 33 def context_path @context_path end |
#host ⇒ String (readonly)
Returns the host the application will deploy its revisions to.
42 43 44 |
# File 'lib/vas/tc_server/node_applications.rb', line 42 def host @host end |
#name ⇒ String (readonly)
Returns the application’s name.
36 37 38 |
# File 'lib/vas/tc_server/node_applications.rb', line 36 def name @name end |
#service ⇒ String (readonly)
Returns the service the application will deploy its revisions to.
39 40 41 |
# File 'lib/vas/tc_server/node_applications.rb', line 39 def service @service end |
Instance Method Details
#group_application ⇒ Application
Returns the application that this node application is a member of.
64 65 66 |
# File 'lib/vas/tc_server/node_applications.rb', line 64 def group_application @group_application ||= Application.new(@group_application_location, client) end |
#instance ⇒ NodeInstance
Returns the node instance that contains the application.
59 60 61 |
# File 'lib/vas/tc_server/node_applications.rb', line 59 def instance @instance ||= NodeInstance.new(@instance_location, client) end |
#revisions ⇒ NodeRevisions
Returns the application’s revisions.
69 70 71 |
# File 'lib/vas/tc_server/node_applications.rb', line 69 def revisions @revisions ||= NodeRevisions.new(@revisions_location, client) end |
#to_s ⇒ String
Returns a string representation of the node application.
74 75 76 |
# File 'lib/vas/tc_server/node_applications.rb', line 74 def to_s "#<#{self.class} name='#@name' context_path='#@context_path' service='#@service' host='#@host'>" end |