Class: OpenNebula::Pool
- Inherits:
-
XMLPool
- Object
- XMLElement
- XMLPool
- OpenNebula::Pool
- Includes:
- Enumerable
- Defined in:
- opennebula/pool.rb
Overview
The Pool class represents a generic OpenNebula Pool in XML format and provides the basic functionality to handle the Pool elements
Direct Known Subclasses
AclPool, ClusterPool, DatastorePool, DocumentPool, GroupPool, HostPool, ImagePool, TemplatePool, UserPool, VirtualMachinePool, VirtualNetworkPool
Constant Summary
- INFO_GROUP =
Constants for info queries (include/RequestManagerPoolInfoFilter.h)
-1
- INFO_ALL =
-2
- INFO_MINE =
-3
Instance Method Summary (collapse)
-
- (Object) each(&block)
Iterates over every PoolElement in the Pool and calls the block with a a PoolElement obtained calling the factory method
block
Block.
- - (Object) each_with_xpath
-
- (Object) to_str
DO NOT USE - ONLY REXML BACKEND.
Methods inherited from XMLPool
Methods inherited from XMLElement
#[], #add_element, #attr, build_xml, #delete_element, #each_xpath, #element_xml, #has_elements?, #initialize_xml, #name, #retrieve_elements, #template_like_str, #template_str, #template_xml, #text, #to_hash, #to_xml
Instance Method Details
- (Object) each(&block)
Iterates over every PoolElement in the Pool and calls the block with a a PoolElement obtained calling the factory method
block |
Block |
148 149 150 |
# File 'opennebula/pool.rb', line 148 def each(&block) each_element(block) if @xml end |
- (Object) each_with_xpath
25 |
# File 'opennebula/pool.rb', line 25 alias_method :each_with_xpath, :each |
- (Object) to_str
DO NOT USE - ONLY REXML BACKEND
153 154 155 156 157 158 |
# File 'opennebula/pool.rb', line 153 def to_str str = "" REXML::Formatters::Pretty.new(1).write(@xml,str) return str end |