Class: TcServer::NodeApplication

Inherits:
Shared::Resource show all
Defined in:
lib/vas/tc_server/node_applications.rb

Overview

A node application

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Constructor Details

#initialize(location, client) ⇒ NodeApplication

:nodoc:



50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/vas/tc_server/node_applications.rb', line 50

def initialize(location, client) #:nodoc:
  super(location, client)

  @revisions = NodeRevisions.new(Util::LinkUtils.get_link_href(details, "node-revisions"), client)

  @context_path = details["context-path"]
  @name = details["name"]
  @service = details["service"]
  @host = details["host"]

  @instance_location = Util::LinkUtils.get_link_href(details, "node-instance")

  @group_application = Application.new(Util::LinkUtils.get_link_href(details, "group-application"), client)
end

Instance Attribute Details

#context_pathObject (readonly)

The application’s context path



33
34
35
# File 'lib/vas/tc_server/node_applications.rb', line 33

def context_path
  @context_path
end

#group_applicationObject (readonly)

The Application that this node application is a member of



48
49
50
# File 'lib/vas/tc_server/node_applications.rb', line 48

def group_application
  @group_application
end

#hostObject (readonly)

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

#nameObject (readonly)

The application’s name



36
37
38
# File 'lib/vas/tc_server/node_applications.rb', line 36

def name
  @name
end

#revisionsObject (readonly)

The application’s NodeRevisions



45
46
47
# File 'lib/vas/tc_server/node_applications.rb', line 45

def revisions
  @revisions
end

#serviceObject (readonly)

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

#instanceObject

The node instance that contains the application



66
67
68
# File 'lib/vas/tc_server/node_applications.rb', line 66

def instance
  NodeInstance.new(@instance_location, client)
end

#to_sObject

:nodoc:



70
71
72
# File 'lib/vas/tc_server/node_applications.rb', line 70

def to_s #:nodoc:
  "#<#{self.class} name='#@name' context_path='#@context_path' service='#@service' host='#@host'>"
end