Class: Shared::Installation Abstract

Inherits:
Resource show all
Defined in:
lib/vas/shared/installations.rb

Overview

This class is abstract.

An installation of a middleware component. Created from an installation image. Once created, an installation is used when creating a new instance and provides the binaries that the instance uses at runtime

Instance Attribute Summary collapse

Attributes inherited from Resource

#location, #security

Instance Method Summary collapse

Constructor Details

#initialize(location, client, installation_image_class, group_class) ⇒ Installation

Returns a new instance of Installation.



53
54
55
56
57
58
59
# File 'lib/vas/shared/installations.rb', line 53

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

  @version = details["version"]
  @installation_image = installation_image_class.new(Util::LinkUtils.get_link_href(details, "installation-image"), client)
  @group = group_class.new(Util::LinkUtils.get_link_href(details, "group"), client)
end

Instance Attribute Details

#groupGroup (readonly)

Returns the group that contains the installation.

Returns:

  • (Group)

    the group that contains the installation



50
51
52
# File 'lib/vas/shared/installations.rb', line 50

def group
  @group
end

#installation_imageInstallationImage (readonly)

Returns the installation image that was used to create the installation.

Returns:

  • (InstallationImage)

    the installation image that was used to create the installation



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

def installation_image
  @installation_image
end

#versionString (readonly)

Returns the installation’s version.

Returns:

  • (String)

    the installation’s version



44
45
46
# File 'lib/vas/shared/installations.rb', line 44

def version
  @version
end

Instance Method Details

#to_sString

Returns a string representation of the installation.

Returns:

  • (String)

    a string representation of the installation



62
63
64
# File 'lib/vas/shared/installations.rb', line 62

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