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
new(client, user_id=-1)
click to toggle source
Class constructor
@param [OpenNebula::Client] client the xml-rpc client @param [Integer] user_id the filter flag, see
http://opennebula.org/documentation:rel3.6:api
@return [DocumentPool] the new object
Calls superclass method
# File lib/opennebula/document_pool.rb, line 58 def initialize(client, user_id=-1) super('DOCUMENT_POOL','DOCUMENT',client) @user_id = user_id end
Public Instance Methods
document_type()
click to toggle source
# File lib/opennebula/document_pool.rb, line 98 def document_type self.class::DOCUMENT_TYPE end
info(*args)
click to toggle source
Retrieves all or part of the Documents in the pool.
@return [nil, OpenNebula::Error] nil in case of success, Error
otherwise
# 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
Also aliased as: info!
info_all()
click to toggle source
Calls superclass method
# File lib/opennebula/document_pool.rb, line 81 def info_all() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Also aliased as: info_all!
info_group()
click to toggle source
Calls superclass method
# File lib/opennebula/document_pool.rb, line 89 def info_group() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Also aliased as: info_group!
info_mine()
click to toggle source
Calls superclass method
# File lib/opennebula/document_pool.rb, line 85 def info_mine() return super(DOCUMENT_POOL_METHODS[:info], document_type) end
Also aliased as: info_mine!