(POOLER-113) Add support for multiple LDAP search bases

This commit updates vmpooler to support setting an array of search bases
in addition to a single base provided as a string. Without this change
it is not possible to specify multiple search bases to use with the LDAP
authentication provider. Additionally, test coverage is added to
the authentication helper method.
This commit is contained in:
kirby@puppetlabs.com 2018-06-25 13:56:55 -07:00
parent de813943e9
commit 9fa27af8e5
7 changed files with 218 additions and 71 deletions

View file

@ -1,16 +1,6 @@
require 'spec_helper'
require 'rack/test'
module Vmpooler
class API
module Helpers
def authenticate(auth, username_str, password_str)
username_str == 'admin' and password_str == 's3cr3t'
end
end
end
end
def has_set_tag?(vm, tag, value)
value == redis.hget("vmpooler__vm__#{vm}", "tag:#{tag}")
end