Class: VMware::Folder
- Inherits:
-
ManagedEntity
- Object
- ManagedEntity
- VMware::Folder
- Defined in:
- lib/vmware/objects/folder.rb
Instance Attribute Summary
Attributes inherited from ManagedEntity
Instance Method Summary collapse
-
#children ⇒ Object
Return the contents of the folder.
- #destroy_Task ⇒ Object
- #rename_Task(name) ⇒ Object
Methods inherited from ManagedEntity
Constructor Details
This class inherits a constructor from VMware::ManagedEntity
Instance Method Details
#children ⇒ Object
Return the contents of the folder.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vmware/objects/folder.rb', line 6 def children result = [] childEntities = self["childEntity"] return [] if childEntities.nil? childEntities.each do |child_entity| result << @session.managed_object_wrapper_factory(child_entity.xmlattr_type, child_entity) end result end |
#destroy_Task ⇒ Object
22 23 24 |
# File 'lib/vmware/objects/folder.rb', line 22 def destroy_Task @session.destroy_Task DestroyRequestType.new self.object_reference end |
#rename_Task(name) ⇒ Object
17 18 19 20 21 |
# File 'lib/vmware/objects/folder.rb', line 17 def rename_Task name rt = RenameRequestType.new self.object_reference rt.newName = name @session.rename_Task rt end |