Class: RabbitMq::Instance
- Inherits:
-
Shared::Instance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::Instance
- RabbitMq::Instance
- Defined in:
- lib/vas/rabbitmq/instances.rb
Overview
A RabbitMQ instance
Instance Attribute Summary collapse
-
#plugins ⇒ Plugins
readonly
The instance’s plugins.
Attributes inherited from Shared::Instance
#group, #live_configurations, #name, #pending_configurations
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ Instance
constructor
A new instance of Instance.
-
#update(installation) ⇒ void
Updates the instance to use a different installation.
Methods inherited from Shared::Instance
#installation, #node_instances, #to_s
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ Instance
Returns a new instance of Instance.
47 48 49 50 |
# File 'lib/vas/rabbitmq/instances.rb', line 47 def initialize(location, client) super(location, client, Group, Installation, LiveConfigurations, PendingConfigurations, NodeInstance, 'node-instance') @plugins = Plugins.new(Util::LinkUtils.get_link_href(details, "plugins"), client) end |
Instance Attribute Details
#plugins ⇒ Plugins (readonly)
Returns the instance’s plugins.
44 45 46 |
# File 'lib/vas/rabbitmq/instances.rb', line 44 def plugins @plugins end |
Instance Method Details
#update(installation) ⇒ void
This method returns an undefined value.
Updates the instance to use a different installation
57 58 59 |
# File 'lib/vas/rabbitmq/instances.rb', line 57 def update(installation) client.post(location, { :installation => installation.location }); end |