mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Spacing
This commit is contained in:
parent
f9e2c30e29
commit
73c61ec26b
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue