Class: TcServer::RevisionImages

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

Overview

Used to enumerate, create, and delete tc Server revision images.

Instance Attribute Summary

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::MutableCollection

#delete

Methods inherited from Shared::Collection

#each

Constructor Details

#initialize(location, client) ⇒ RevisionImages

:nodoc:



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

def initialize(location, client) #:nodoc:
  super(location, client, "revision-images", RevisionImage)
end

Instance Method Details

#create(path, name, version) ⇒ Object

Creates a RevisionImage named name with the version version by uploading the WAR file at the given path



28
29
30
# File 'lib/vas/tc_server/revision_images.rb', line 28

def create(path, name, version)
  RevisionImage.new(client.post_image(location, path, { :name => name, :version => version }), client)
end