Class: Sqlfire::ServerInstances
- Inherits:
-
Shared::MutableCollection
- Object
- Shared::Resource
- Shared::Collection
- Shared::MutableCollection
- Sqlfire::ServerInstances
- Defined in:
- lib/vas/sqlfire/server_instances.rb
Overview
Used to enumerate, create, and delete server instances.
Instance Attribute Summary
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#create(installation, name, options = {}) ⇒ ServerInstance
Creates a new server instance.
-
#initialize(location, client) ⇒ ServerInstances
constructor
A new instance of ServerInstances.
Methods inherited from Shared::MutableCollection
Methods inherited from Shared::Collection
Constructor Details
#initialize(location, client) ⇒ ServerInstances
Returns a new instance of ServerInstances.
36 37 38 |
# File 'lib/vas/sqlfire/server_instances.rb', line 36 def initialize(location, client) super(location, client, "server-group-instances", ServerInstance) end |
Instance Method Details
#create(installation, name, options = {}) ⇒ ServerInstance
Creates a new server instance
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vas/sqlfire/server_instances.rb', line 65 def create(installation, name, = {}) payload = { :installation => installation.location, :name => name } .each { |key, value| if (CREATE_PAYLOAD_KEYS.include?(key)) payload[key] = value end } super(payload, 'server-group-instance') end |