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.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/vas/tc_server/node_applications.rb', line 54

def initialize(location, client)
  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 = NodeInstance.new(Util::LinkUtils.get_link_href(details, "node-instance"), client)

  @group_application = Application.new(Util::LinkUtils.get_link_href(details, "group-application"), client)
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

#group_applicationApplication (readonly)

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

Returns:

  • (Application)

    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

#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

#instanceNodeInstance (readonly)

Returns the node instance that contains the application.

Returns:

  • (NodeInstance)

    the node instance that contains the application



51
52
53
# File 'lib/vas/tc_server/node_applications.rb', line 51

def instance
  @instance
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

#revisionsNodeRevisions (readonly)

Returns the application’s revisions.

Returns:



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

def revisions
  @revisions
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

#to_sString

Returns a string representation of the node application.

Returns:

  • (String)

    a string representation of the node application



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

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