mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-70) Update _check_pool for VM Provider
Previously the Pool Manager would use vSphere objects directly. This commit - Modifies the pool_manager to use the VM provider methods instead - Removes the MockFindFolder class as it is no longer required - Minor update for rubocop violations
This commit is contained in:
parent
7c3ad716af
commit
2ca1a39e8c
3 changed files with 41 additions and 48 deletions
|
|
@ -6,21 +6,6 @@ def redis
|
|||
@redis
|
||||
end
|
||||
|
||||
# Mock an object which is result from Vmpooler::VsphereHelper.find_folder(foldername)
|
||||
class MockFindFolder
|
||||
attr_reader :childEntity
|
||||
|
||||
def initialize(vmlist = [])
|
||||
# Generate an array of hashes
|
||||
@childEntity = vmlist.map do |vm|
|
||||
vm_object = {}
|
||||
vm_object['name'] = vm
|
||||
|
||||
vm_object
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Mock an object which represents a Logger. This stops the proliferation
|
||||
# of allow(logger).to .... expectations in tests.
|
||||
class MockLogger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue