Class: Shared::InstallationImage Abstract

Inherits:
Resource
  • Object
show all
Includes:
Deletable
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.

Instance Attribute Summary collapse

Attributes included from Deletable

#collection

Attributes inherited from Resource

#location, #security

Instance Method Summary collapse

Methods included from Deletable

#delete

Constructor Details

#initialize(location, client, installation_class) ⇒ 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

#sizeInteger (readonly)



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

def size
  @size
end

#versionString (readonly)



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

def version
  @version
end

Instance Method Details

#installationsInstallation[]



71
72
73
# File 'lib/vas/shared/installation_images.rb', line 71

def installations
  @installations ||= create_resources_from_links('installation', @installation_class)
end

#reloadvoid

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_sString



76
77
78
# File 'lib/vas/shared/installation_images.rb', line 76

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