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) 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 |
144 145 146 |
# File 'OpenNebula/Pool.rb', line 144 def each(&block) each_element(block) if @xml end |
- (Object) to_str
DO NOT USE - ONLY REXML BACKEND
149 150 151 152 153 154 |
# File 'OpenNebula/Pool.rb', line 149 def to_str str = "" REXML::Formatters::Pretty.new(1).write(@xml,str) return str end |