mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -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
|
:insecure => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# an easier wrapper around the horrid PropertyCollector interface,
|
# an easier wrapper around the horrid PropertyCollector interface,
|
||||||
# necessary for searching VMs in all Datacenters that may be nested
|
# necessary for searching VMs in all Datacenters that may be nested
|
||||||
# within folders of arbitrary depth
|
# within folders of arbitrary depth
|
||||||
|
|
@ -71,11 +73,15 @@ class VsphereHelper
|
||||||
vms
|
vms
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def find_datastore datastorename
|
def find_datastore datastorename
|
||||||
datacenter = @connection.serviceInstance.find_datacenter
|
datacenter = @connection.serviceInstance.find_datacenter
|
||||||
datacenter.find_datastore(datastorename)
|
datacenter.find_datastore(datastorename)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def find_folder foldername
|
def find_folder foldername
|
||||||
datacenter = @connection.serviceInstance.find_datacenter
|
datacenter = @connection.serviceInstance.find_datacenter
|
||||||
base = datacenter.vmFolder
|
base = datacenter.vmFolder
|
||||||
|
|
@ -92,6 +98,8 @@ class VsphereHelper
|
||||||
base
|
base
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def find_pool poolname
|
def find_pool poolname
|
||||||
datacenter = @connection.serviceInstance.find_datacenter
|
datacenter = @connection.serviceInstance.find_datacenter
|
||||||
base = datacenter.hostFolder
|
base = datacenter.hostFolder
|
||||||
|
|
@ -113,6 +121,8 @@ class VsphereHelper
|
||||||
base
|
base
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_base_vm_container_from connection
|
def get_base_vm_container_from connection
|
||||||
viewManager = connection.serviceContent.viewManager
|
viewManager = connection.serviceContent.viewManager
|
||||||
viewManager.CreateContainerView({
|
viewManager.CreateContainerView({
|
||||||
|
|
@ -122,6 +132,8 @@ class VsphereHelper
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def close
|
def close
|
||||||
@connection.close
|
@connection.close
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue