Class: OpenNebula::HookLog
- Inherits:
-
XMLElement
- Object
- XMLElement
- OpenNebula::HookLog
- Defined in:
- lib/opennebula/hook_log.rb
Overview
Class representing the HookLog
Constant Summary collapse
- HOOK_LOG_METHODS =
Constants and Class attribute accessors
{ :info => 'hooklog.info' }
- ROOT_NAME =
'HOOKLOG'
Instance Method Summary collapse
-
#info(min_ts, max_ts, hook_id, rc) ⇒ Object
(also: #info!)
XML-RPC Methods for the HookLog object.
-
#initialize(client) ⇒ HookLog
constructor
client
a Client object that represents an XML-RPC connection.
Methods inherited from XMLElement
#[], #add_element, #attr, build_xml, #delete_element, #each, #each_xpath, #element_xml, #has_elements?, #initialize_xml, #name, #retrieve_elements, #retrieve_xmlelements, #set_content, #template_like_str, #template_str, #template_xml, #text, #to_hash, #to_xml, #xml_nil?
Constructor Details
#initialize(client) ⇒ HookLog
client
a Client object that represents an XML-RPC connection
39 40 41 42 43 |
# File 'lib/opennebula/hook_log.rb', line 39 def initialize(client) super(nil) @client = client end |
Instance Method Details
#info(min_ts, max_ts, hook_id, rc) ⇒ Object Also known as: info!
XML-RPC Methods for the HookLog object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/opennebula/hook_log.rb', line 49 def info(min_ts, max_ts, hook_id, rc) rc = @client.call(HOOK_LOG_METHODS[:info], min_ts, max_ts, hook_id, rc) if !OpenNebula.is_error?(rc) initialize_xml(rc, ROOT_NAME) rc = nil end rc end |