From 73c61ec26b6ac703dde1f932464f2fe30e6e9e7d Mon Sep 17 00:00:00 2001 From: Scott Schneider Date: Thu, 21 Nov 2013 15:33:41 -0800 Subject: [PATCH] Spacing --- lib/vsphere_helper.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/vsphere_helper.rb b/lib/vsphere_helper.rb index 1edb69f..4bcd19a 100755 --- a/lib/vsphere_helper.rb +++ b/lib/vsphere_helper.rb @@ -20,6 +20,8 @@ class VsphereHelper :insecure => true end + + # an easier wrapper around the horrid PropertyCollector interface, # necessary for searching VMs in all Datacenters that may be nested # within folders of arbitrary depth @@ -71,11 +73,15 @@ class VsphereHelper vms end + + def find_datastore datastorename datacenter = @connection.serviceInstance.find_datacenter datacenter.find_datastore(datastorename) end + + def find_folder foldername datacenter = @connection.serviceInstance.find_datacenter base = datacenter.vmFolder @@ -92,6 +98,8 @@ class VsphereHelper base end + + def find_pool poolname datacenter = @connection.serviceInstance.find_datacenter base = datacenter.hostFolder @@ -113,6 +121,8 @@ class VsphereHelper base end + + def get_base_vm_container_from connection viewManager = connection.serviceContent.viewManager viewManager.CreateContainerView({ @@ -122,6 +132,8 @@ class VsphereHelper }) end + + def close @connection.close end