Class: RabbitMq::Instance

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

Overview

A Rabbit instance

Instance Attribute Summary collapse

Attributes inherited from Shared::Instance

#group, #live_configurations, #name, #node_instances, #pending_configurations

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Instance

#installation, #to_s

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ Instance

:nodoc:



41
42
43
44
# File 'lib/vas/rabbitmq/instances.rb', line 41

def initialize(location, client) #:nodoc:
  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

#pluginsObject (readonly)

The instance’s plugins



39
40
41
# File 'lib/vas/rabbitmq/instances.rb', line 39

def plugins
  @plugins
end

Instance Method Details

#update(installation, runtime_version = nil) ⇒ Object

Updates the instance to use the given installation



47
48
49
# File 'lib/vas/rabbitmq/instances.rb', line 47

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