Class: StackMate::CloudStackResource

Inherits:
Ruote::Participant
  • Object
show all
Includes:
Logging, Resolver
Defined in:
lib/stackmate/participants/cloudstack.rb

Constant Summary

Constants included from Resolver

Resolver::INTEXP, Resolver::STRINGEXP, Resolver::UUIDEXP

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Resolver

#get_named_tag, #get_resolved, #resolve_tags, #resolve_to_deviceid, #validate_param

Methods included from Logging

configure_logger_for, #logger, logger_for

Constructor Details

#initialize(opts) ⇒ CloudStackResource



24
25
26
27
28
29
30
31
# File 'lib/stackmate/participants/cloudstack.rb', line 24

def initialize(opts)
  @opts = opts
  @url = opts['URL'] || ENV['URL'] or raise ArgumentError.new("CloudStackResources: no URL supplied for CloudStack API")
  @apikey = opts['APIKEY'] || ENV['APIKEY'] or raise ArgumentError.new("CloudStackResources: no api key supplied for CloudStack API")
  @seckey = opts['SECKEY'] || ENV['SECKEY'] or raise ArgumentError.new("CloudStackResources: no secret key supplied for CloudStack API")
  #@client = CloudstackRubyClient::Client.new(@url, @apikey, @seckey, false)
  @client = StackMate::CloudStackClient.new(@url, @apikey, @seckey, false)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/stackmate/participants/cloudstack.rb', line 22

def name
  @name
end

Instance Method Details

#on_workitemObject



33
34
35
36
# File 'lib/stackmate/participants/cloudstack.rb', line 33

def on_workitem
  p workitem.participant_name
  reply
end