chromeos-config: Pass schema to CrosConfigValidator constructor

Rather than passing the schema to the Start() method, pass it to the
constructor. We are not planning to pass different schemas, and this
allows us to return a CrosConfigValidator with the schema set up and
ready to use.

Add a GetValidator() function for this. This will be called by
libcros_config_host to access schema information.

BUG=chromium:769575
TEST=PYTHONPATH=~/cosarm \
   python cros_config_host_py/libcros_config_host_unittest.py;
PYTHONPATH=~/cosarm \
   python validate/validate_config_unittest.py

Change-Id: I06ce2683b7fa4309d6bc9e19825fdb2384d0cf7c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/729135
Reviewed-by: Jason Clinton <jclinton@chromium.org>
2 files changed