Class: RVC::RootSnapshotFolder
- Inherits:
-
Object
- Object
- RVC::RootSnapshotFolder
- Includes:
- InventoryObject
- Defined in:
- lib/rvc/extensions/VirtualMachine.rb
Instance Attribute Summary
Attributes included from InventoryObject
Instance Method Summary collapse
- #children ⇒ Object
- #display_info ⇒ Object
-
#initialize(vm) ⇒ RootSnapshotFolder
constructor
A new instance of RootSnapshotFolder.
Methods included from InventoryObject
included, #ls_text, #rvc_link, #rvc_path, #rvc_path_str, #traverse_one
Constructor Details
#initialize(vm) ⇒ RootSnapshotFolder
Returns a new instance of RootSnapshotFolder.
104 105 106 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 104 def initialize vm @vm = vm end |
Instance Method Details
#children ⇒ Object
108 109 110 111 112 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 108 def children info = @vm.snapshot return {} unless info Hash[info.rootSnapshotList.map { |x| [x.name, RVC::SnapshotFolder.new(@vm, [x.id])] }] end |
#display_info ⇒ Object
114 115 116 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 114 def display_info puts "Root of a VM's snapshot tree" end |