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_children, #rvc_link, #rvc_path, #rvc_path_str, #rvc_relative_path, #rvc_relative_path_str, #traverse_one
Methods included from ObjectWithFields::ClassMethods
Methods included from ObjectWithFields
#field, #field_properties, #perfmetrics
Constructor Details
#initialize(vm) ⇒ RootSnapshotFolder
Returns a new instance of RootSnapshotFolder.
250 251 252 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 250 def initialize vm @vm = vm end |
Instance Method Details
#children ⇒ Object
254 255 256 257 258 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 254 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
260 261 262 |
# File 'lib/rvc/extensions/VirtualMachine.rb', line 260 def display_info puts "Root of a VM's snapshot tree" end |