class OpenNebula::DocumentPool
All subclasses must define the DOCUMENT_TYPE constant and the factory method.
@example
require 'opennebula/document_pool' module OpenNebula class CustomObjectPool < DocumentPool DOCUMENT_TYPE = 400 def factory(element_xml) OpenNebula::CustomObject.new(element_xml, @client) end end end
Constants
- DOCUMENT_POOL_METHODS
-
Constants and Class attribute accessors
Public Class Methods
Source
# File lib/opennebula/document_pool.rb, line 58 def initialize(client, user_id=-1) super('DOCUMENT_POOL','DOCUMENT',client) @user_id = user_id end
Class constructor
@param [OpenNebula::Client] client the xml-rpc client @param [Integer] user_id the filter flag, see
http://docs.opennebula.io/stable/integration/system_interfaces/api.html
@return [DocumentPool] the new object
Calls superclass method
Public Instance Methods
Source
# File lib/opennebula/document_pool.rb, line 98 def document_type self.class::DOCUMENT_TYPE end
Source
# File lib/opennebula/document_pool.rb, line 72 def info(*args) case args.size when 0 info_filter(DOCUMENT_POOL_METHODS[:info],@user_id,-1,-1, document_type) when 3 info_filter(DOCUMENT_POOL_METHODS[:info],args[0],args[1],args[2], document_type) end end
Retrieves all or part of the Documents in the pool.
@return [nil, OpenNebula::Error
] nil in case of success, Error
otherwise
Also aliased as: info!
Source
# File lib/opennebula/document_pool.rb, line 81 def info_all() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Calls superclass method
Also aliased as: info_all!
Source
# File lib/opennebula/document_pool.rb, line 89 def info_group() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Calls superclass method
Also aliased as: info_group!
Source
# File lib/opennebula/document_pool.rb, line 85 def info_mine() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Calls superclass method
Also aliased as: info_mine!