Class: Sqlfire::AgentInstances

Inherits:
Shared::MutableCollection show all
Defined in:
lib/vas/sqlfire/agent_instances.rb

Overview

Used to enumerate, create, and delete agent instances.

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

Returns a new instance of AgentInstances.



23
24
25
# File 'lib/vas/sqlfire/agent_instances.rb', line 23

def initialize(location, client)
  super(location, client, 'agent-group-instances', AgentInstance)
end

Instance Method Details

#create(installation, name, options = {}) ⇒ AgentInstance

Returns the new agent instance.

Returns:



36
37
38
39
40
41
42
43
44
# File 'lib/vas/sqlfire/agent_instances.rb', line 36

def create(installation, name, options = {})
  payload = { :installation => installation.location, :name => name }

  if options.has_key? 'jvm-options'
    payload['jvm-options'] = options['jvm-options']
  end

  super(payload, 'agent-group-instance')
end