mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
vSphere functions should use connection object in vsphere_helper lib
This commit is contained in:
parent
30ebe4249e
commit
b808b9c6c1
1 changed files with 0 additions and 11 deletions
|
|
@ -21,16 +21,6 @@ config = YAML.load_file(config_file)
|
||||||
pools = config[:pools]
|
pools = config[:pools]
|
||||||
vsphere = config[:vsphere]
|
vsphere = config[:vsphere]
|
||||||
|
|
||||||
# Connect to vSphere
|
|
||||||
$vim = RbVmomi::VIM.connect(
|
|
||||||
:host => vsphere['server'],
|
|
||||||
:user => vsphere['username'],
|
|
||||||
:password => vsphere['password'],
|
|
||||||
:ssl => true,
|
|
||||||
:insecure => true,
|
|
||||||
:rev => '5.1'
|
|
||||||
)
|
|
||||||
|
|
||||||
# Connect to Redis
|
# Connect to Redis
|
||||||
$redis = Redis.new
|
$redis = Redis.new
|
||||||
|
|
||||||
|
|
@ -41,7 +31,6 @@ loop do
|
||||||
total = 0
|
total = 0
|
||||||
|
|
||||||
# Locate the resource pool
|
# Locate the resource pool
|
||||||
datacenter = $vim.serviceInstance.find_datacenter
|
|
||||||
base = vsphere_helper.find_pool(pool['pool'])
|
base = vsphere_helper.find_pool(pool['pool'])
|
||||||
|
|
||||||
# Make sure all VMs in resource pool are accounted-for
|
# Make sure all VMs in resource pool are accounted-for
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue