Class: TcServer::NodeApplication

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

Overview

An application on a node instance

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

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_pathString (readonly)

Returns the application’s context path.

Returns:

  • (String)

    the application’s context path



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

def context_path
  @context_path
end

#hostString (readonly)

Returns the host the application will deploy its revisions to.

Returns:

  • (String)

    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

#nameString (readonly)

Returns the application’s name.

Returns:

  • (String)

    the application’s name



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

def name
  @name
end

#serviceString (readonly)

Returns the service the application will deploy its revisions to.

Returns:

  • (String)

    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_applicationApplication

Returns the application that this node application is a member of.

Returns:

  • (Application)

    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

#instanceNodeInstance

Returns the node instance that contains the application.

Returns:

  • (NodeInstance)

    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

#revisionsNodeRevisions

Returns the application’s revisions.

Returns:



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

def revisions
  @revisions ||= NodeRevisions.new(@revisions_location, client)
end

#to_sString

Returns a string representation of the node application.

Returns:

  • (String)

    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