Class: StackMate::CloudStackResource
- Inherits:
-
Ruote::Participant
- Object
- Ruote::Participant
- StackMate::CloudStackResource
- Includes:
- Logging
- Defined in:
- lib/stackmate/participants/cloudstack.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(opts) ⇒ CloudStackResource
constructor
A new instance of CloudStackResource.
- #on_workitem ⇒ Object
Methods included from Logging
configure_logger_for, #logger, logger_for
Constructor Details
#initialize(opts) ⇒ CloudStackResource
Returns a new instance of CloudStackResource.
20 21 22 23 24 25 26 |
# File 'lib/stackmate/participants/cloudstack.rb', line 20 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) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/stackmate/participants/cloudstack.rb', line 18 def name @name end |
Instance Method Details
#on_workitem ⇒ Object
28 29 30 31 |
# File 'lib/stackmate/participants/cloudstack.rb', line 28 def on_workitem p workitem.participant_name reply end |