Class: RabbitMq::Instance

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

Overview

A RabbitMQ instance

Instance Attribute Summary collapse

Attributes inherited from Shared::Instance

#group, #live_configurations, #name, #pending_configurations

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Instance

#installation, #node_instances, #to_s

Methods inherited from Shared::StateResource

#start, #state, #stop

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

#pluginsPlugins (readonly)

Returns the instance’s plugins.

Returns:

  • (Plugins)

    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

Parameters:

  • installation (Installation)

    the installation that the instance should use



57
58
59
# File 'lib/vas/rabbitmq/instances.rb', line 57

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