Class: VMware::Folder

Inherits:
ManagedEntity show all
Defined in:
lib/vmware/objects/folder.rb

Instance Attribute Summary

Attributes inherited from ManagedEntity

#object_reference

Instance Method Summary collapse

Methods inherited from ManagedEntity

#[], #initialize, #properties

Constructor Details

This class inherits a constructor from VMware::ManagedEntity

Instance Method Details

#childrenObject

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_TaskObject



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