(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:
Glenn Sarti 2017-03-31 14:31:43 -07:00
parent 7c3ad716af
commit 2ca1a39e8c
3 changed files with 41 additions and 48 deletions

View file

@ -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