Class: TcServer::TemplateImages

Inherits:
Shared::MutableCollection show all
Defined in:
lib/vas/tc_server/template_images.rb

Overview

Used to enumerate, create, and delete tc Server template 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) ⇒ TemplateImages

Returns a new instance of TemplateImages.



23
24
25
# File 'lib/vas/tc_server/template_images.rb', line 23

def initialize(location, client)
  super(location, client, 'template-images', TemplateImage)
end

Instance Method Details

#create(path, name, version) ⇒ TemplateImage

Creates a new template image by uploading a .zip file to the server

Parameters:

  • path (String)

    the path of the template image .zip file

  • name (String)

    the name of the template image

  • version (String)

    the version of the template image

Returns:



34
35
36
# File 'lib/vas/tc_server/template_images.rb', line 34

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