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
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.
-
#plugins ⇒ Plugins
The instance’s plugins.
-
#update(installation) ⇒ void
Updates the instance to use a different installation.
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.
44 45 46 47 |
# File 'lib/vas/rabbitmq/instances.rb', line 44 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 Method Details
#plugins ⇒ Plugins
Returns the instance’s plugins.
60 61 62 |
# File 'lib/vas/rabbitmq/instances.rb', line 60 def plugins @plugins ||= Plugins.new(Util::LinkUtils.get_link_href(details, 'plugins'), client) end |
#update(installation) ⇒ void
This method returns an undefined value.
Updates the instance to use a different installation
54 55 56 57 |
# File 'lib/vas/rabbitmq/instances.rb', line 54 def update(installation) client.post(location, { :installation => installation.location }) reload end |