Class: Shared::InstallationImages Abstract

Inherits:
MutableCollection show all
Defined in:
lib/vas/shared/installation_images.rb

Overview

This class is abstract.

A collection of installation images

Instance Attribute Summary

Attributes inherited from Resource

#location, #security

Instance Method Summary collapse

Methods inherited from MutableCollection

#create_image

Methods inherited from Collection

#each, #reload

Constructor Details

#initialize(location, client, installation_image_class) ⇒ InstallationImages

Returns a new instance of InstallationImages.



23
24
25
# File 'lib/vas/shared/installation_images.rb', line 23

def initialize(location, client, installation_image_class)
  super(location, client, 'installation-images', installation_image_class)
end

Instance Method Details

#create(path, version) ⇒ InstallationImage

Creates an installation image by uploading a file to the server and assigning it a version

Parameters:

  • path

    the path of the file to upload

  • version (String)

    the installation image’s version

Returns:



33
34
35
# File 'lib/vas/shared/installation_images.rb', line 33

def create(path, version)
  create_image(path, { :version => version })
end