Class: WebServer::Instance
- Inherits:
-
Shared::Instance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::Instance
- WebServer::Instance
- Defined in:
- lib/vas/web_server/instances.rb
Overview
A Web Server instance
Instance Attribute Summary
Attributes inherited from Shared::Instance
Attributes included from Shared::Deletable
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Instance
constructor
A new instance of Instance.
-
#update(installation) ⇒ void
Updates the installation used by the instance.
Methods inherited from Shared::Instance
#group, #installation, #live_configurations, #node_instances, #pending_configurations, #reload, #start, #stop, #to_s
Methods included from Shared::Deletable
Methods inherited from Shared::StateResource
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
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 |