Class: WebServer::InstallationImages

Inherits:
Shared::InstallationImages show all
Defined in:
lib/vas/web_server/installation_images.rb

Overview

Used to enumerate, create, and delete Web Server installation images.

Instance Attribute Summary

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::MutableCollection

#create_image

Methods inherited from Shared::Collection

#each, #reload

Constructor Details

#initialize(location, client) ⇒ InstallationImages

Returns a new instance of InstallationImages.



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

def initialize(location, client)
  super(location, client, InstallationImage)
end

Instance Method Details

#create(path, version, architecture, operating_system) ⇒ InstallationImage

Creates an installation image by uploading a file to the server and assigning it a version, architecture, and operating system

Parameters:

  • path

    the path of the file to upload

  • version (String)

    the installation image’s version

  • architecture (String)

    the installation image’s architecture

  • operating_system (String)

    the installation image’s operating system

Returns:



36
37
38
39
40
# File 'lib/vas/web_server/installation_images.rb', line 36

def create(path, version, architecture, operating_system)
  create_image(path, { :version => version,
                       :architecture => architecture,
                       'operating-system' => operating_system })
end