Class: TcServer::TemplateImages
- Inherits:
-
Shared::MutableCollection
- Object
- Shared::Resource
- Shared::Collection
- Shared::MutableCollection
- TcServer::TemplateImages
- 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
Instance Method Summary collapse
-
#create(path, name, version) ⇒ Object
Creates a TemplateImage named
name
with the versionversion
by uploading the file at the givenpath
. -
#initialize(location, client) ⇒ TemplateImages
constructor
:nodoc:.
Methods inherited from Shared::MutableCollection
Methods inherited from Shared::Collection
Constructor Details
#initialize(location, client) ⇒ TemplateImages
:nodoc:
23 24 25 |
# File 'lib/vas/tc_server/template_images.rb', line 23 def initialize(location, client) #:nodoc: super(location, client, "template-images", TemplateImage) end |
Instance Method Details
#create(path, name, version) ⇒ Object
Creates a TemplateImage named name
with the version version
by uploading the file at the given path
28 29 30 |
# File 'lib/vas/tc_server/template_images.rb', line 28 def create(path, name, version) TemplateImage.new(client.post_image(location, path, { :name => name, :version => version }), client) end |