mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(GH-213) Remove use of private _connection method
Previosuly in find_vmdks in vsphere_helper it uses the call vmdk_datastore._connection to get the underlying connection, however this is already available as function parameter. This commit removes this bad code and the associated test fixtures.
This commit is contained in:
parent
ee3f5e2215
commit
3a4df791ff
2 changed files with 1 additions and 22 deletions
|
|
@ -674,7 +674,7 @@ module Vmpooler
|
|||
|
||||
vmdk_datastore = find_datastore(datastore, connection)
|
||||
|
||||
vm_files = vmdk_datastore._connection.serviceContent.propertyCollector.collectMultiple vmdk_datastore.vm, 'layoutEx.file'
|
||||
vm_files = connection.serviceContent.propertyCollector.collectMultiple vmdk_datastore.vm, 'layoutEx.file'
|
||||
vm_files.keys.each do |f|
|
||||
vm_files[f]['layoutEx.file'].each do |l|
|
||||
if l.name =~ /^\[#{vmdk_datastore.name}\] #{vmname}\/#{vmname}_([0-9]+).vmdk/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue