Class: Shared::InstallationImage Abstract
- Defined in:
- lib/vas/shared/installation_images.rb
Overview
This class is abstract.
A product binary, typically are .zip or .tar.gz file, that has been uploaded to the server. Once created, an installation image can then be used to create an installation on a group.
Direct Known Subclasses
Gemfire::InstallationImage, RabbitMq::InstallationImage, TcServer::InstallationImage
Instance Attribute Summary collapse
-
#size ⇒ Integer
readonly
The installation image’s size.
-
#version ⇒ String
readonly
The installation image’s version.
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(location, client, installation_class) ⇒ InstallationImage
constructor
A new instance of InstallationImage.
-
#installations ⇒ Installation[]
The installations that have been created from the installation image.
-
#to_s ⇒ String
A string representation of the installation image.
Constructor Details
#initialize(location, client, installation_class) ⇒ InstallationImage
Returns a new instance of InstallationImage.
51 52 53 54 55 56 |
# File 'lib/vas/shared/installation_images.rb', line 51 def initialize(location, client, installation_class) #:nodoc: super(location, client) @version = details["version"] @size = details["size"] @installation_class = installation_class end |
Instance Attribute Details
#size ⇒ Integer (readonly)
Returns the installation image’s size.
48 49 50 |
# File 'lib/vas/shared/installation_images.rb', line 48 def size @size end |
#version ⇒ String (readonly)
Returns the installation image’s version.
45 46 47 |
# File 'lib/vas/shared/installation_images.rb', line 45 def version @version end |
Instance Method Details
#installations ⇒ Installation[]
Returns the installations that have been created from the installation image.
59 60 61 62 63 64 65 |
# File 'lib/vas/shared/installation_images.rb', line 59 def installations installations = [] Util::LinkUtils.get_link_hrefs(client.get(location), "installation").each { |installation_location| installations << @installation_class.new(installation_location, client) } installations end |
#to_s ⇒ String
Returns a string representation of the installation image.
68 69 70 |
# File 'lib/vas/shared/installation_images.rb', line 68 def to_s "#<#{self.class} version='#@version'>" end |