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, 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, #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 |
99 100 101 |
# File 'OpenNebula/Pool.rb', line 99 def each(&block) each_element(block) if @xml end |
- (Object) to_str
DO NOT USE - ONLY REXML BACKEND
104 105 106 107 108 109 |
# File 'OpenNebula/Pool.rb', line 104 def to_str str = "" REXML::Formatters::Pretty.new(1).write(@xml,str) return str end |