Class: Shared::InstallationImage Abstract
- Includes:
- Deletable
- Defined in:
- lib/vas/shared/installation_images.rb
Overview
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, Sqlfire::InstallationImage, TcServer::InstallationImage, WebServer::InstallationImage
Instance Attribute Summary collapse
-
#size ⇒ Integer
readonly
The installation image’s size.
-
#version ⇒ String
readonly
The installation image’s version.
Attributes included from Deletable
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.
-
#reload ⇒ void
Reloads the installation image’s details from the server.
-
#to_s ⇒ String
A string representation of the installation image.
Methods included from Deletable
Constructor Details
#initialize(location, client, installation_class) ⇒ InstallationImage
Returns a new instance of InstallationImage.
53 54 55 56 57 58 59 60 |
# File 'lib/vas/shared/installation_images.rb', line 53 def initialize(location, client, installation_class) #:nodoc: super(location, client) @installation_class = installation_class @version = details['version'] @size = details['size'] end |
Instance Attribute Details
#size ⇒ Integer (readonly)
Returns the installation image’s size.
50 51 52 |
# File 'lib/vas/shared/installation_images.rb', line 50 def size @size end |
#version ⇒ String (readonly)
Returns the installation image’s version.
47 48 49 |
# File 'lib/vas/shared/installation_images.rb', line 47 def version @version end |
Instance Method Details
#installations ⇒ Installation[]
Returns the installations that have been created from the installation image.
71 72 73 |
# File 'lib/vas/shared/installation_images.rb', line 71 def installations @installations ||= create_resources_from_links('installation', @installation_class) end |
#reload ⇒ void
This method returns an undefined value.
Reloads the installation image’s details from the server
65 66 67 68 |
# File 'lib/vas/shared/installation_images.rb', line 65 def reload super @installations = nil end |
#to_s ⇒ String
Returns a string representation of the installation image.
76 77 78 |
# File 'lib/vas/shared/installation_images.rb', line 76 def to_s "#<#{self.class} version='#@version' size='#@size'>" end |