Class: TcServer::Installation

Inherits:
Shared::Installation show all
Defined in:
lib/vas/tc_server/installations.rb

Overview

A tc Server installation

Instance Attribute Summary collapse

Attributes inherited from Shared::Installation

#version

Attributes included from Shared::Deletable

#collection

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Installation

#group, #installation_image, #to_s

Methods included from Shared::Deletable

#delete

Constructor Details

#initialize(location, client) ⇒ Installation

Returns a new instance of Installation.



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

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

  @runtime_versions = details['runtime-versions']
  @templates_location = Util::LinkUtils.get_link_href(details, 'templates')
end

Instance Attribute Details

#runtime_versionsString[] (readonly)

Returns the versions of the tc Server runtime that are supported by the installation.

Returns:

  • (String[])

    the versions of the tc Server runtime that are supported by the installation



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

def runtime_versions
  @runtime_versions
end

Instance Method Details

#instancesInstance[]

Returns the instances that are using the installation.

Returns:

  • (Instance[])

    the instances that are using the installation



52
53
54
# File 'lib/vas/tc_server/installations.rb', line 52

def instances
  @instances ||= create_resources_from_links('group-instance', Instance)
end

#reloadvoid

This method returns an undefined value.

Reloads the installation’s details from the server



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

def reload
  super
  @instances = nil
end

#templatesTemplates

Returns the installation’s templates.

Returns:

  • (Templates)

    the installation’s templates



57
58
59
# File 'lib/vas/tc_server/installations.rb', line 57

def templates
  @templates ||= Templates.new(@templates_location, client)
end