Class: TcServer::NodeRevision

Inherits:
Shared::StateResource show all
Defined in:
lib/vas/tc_server/node_revisions.rb

Overview

A revision of a node application

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ NodeRevision

Returns a new instance of NodeRevision.



36
37
38
39
40
41
42
43
# File 'lib/vas/tc_server/node_revisions.rb', line 36

def initialize(location, client)
  super(location, client)

  @application_location = Util::LinkUtils.get_link_href(details, 'node-application')
  @group_revision_location = Util::LinkUtils.get_link_href(details, 'group-revision')

  @version = details['version']
end

Instance Attribute Details

#versionString (readonly)

Returns the revision’s version.

Returns:

  • (String)

    the revision’s version



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

def version
  @version
end

Instance Method Details

#applicationNodeApplication

Returns the revision’s application.

Returns:



46
47
48
# File 'lib/vas/tc_server/node_revisions.rb', line 46

def application
  @application ||= NodeApplication.new(@application_location, client)
end

#group_revisionRevision

Returns the group revision that this node revision is a member of.

Returns:

  • (Revision)

    the group revision that this node revision is a member of



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

def group_revision
  @group_revision ||= Revision.new(@group_revision_location, client)
end

#to_sString

Returns a string representation of the node revision.

Returns:

  • (String)

    a string representation of the node revision



56
57
58
# File 'lib/vas/tc_server/node_revisions.rb', line 56

def to_s
  "#<#{self.class} version='#@version'>"
end