Class: TcServer::Templates

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

Overview

Used to enumerate, create, and delete tc Server templates.

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) ⇒ Templates

Returns a new instance of Templates.



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

def initialize(location, client)
  super(location, client, 'templates', Template)
end

Instance Method Details

#create(template_image) ⇒ Template

Creates a new template

Parameters:

  • template_image (TemplateImage)

    the template image to use to create the template

Returns:



32
33
34
# File 'lib/vas/tc_server/templates.rb', line 32

def create(template_image)
  super({ :image => template_image.location }, 'template')
end