Class: WebServer::Instance

Inherits:
Shared::Instance show all
Defined in:
lib/vas/web_server/instances.rb

Overview

A Web Server instance

Instance Attribute Summary

Attributes inherited from Shared::Instance

#name

Attributes included from Shared::Deletable

#collection

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Instance

#group, #installation, #live_configurations, #node_instances, #pending_configurations, #reload, #start, #stop, #to_s

Methods included from Shared::Deletable

#delete

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ Instance

Returns a new instance of Instance.



48
49
50
# File 'lib/vas/web_server/instances.rb', line 48

def initialize(location, client)
  super(location, client, Group, Installation, LiveConfigurations, PendingConfigurations, NodeInstance, 'node-instance')
end

Instance Method Details

#update(installation) ⇒ void

This method returns an undefined value.

Updates the installation used by the instance

Parameters:

  • installation (Installation)

    the installation to be used by the instance



57
58
59
60
61
# File 'lib/vas/web_server/instances.rb', line 57

def update(installation)
  payload = { :installation => installation.location }
  client.post(location, payload)
  reload
end